LCOV - code coverage report
Current view: top level - gcc/rust/checks/errors/feature - rust-feature-store.cc (source / functions) Coverage Total Hit
Test: gcc.info Lines: 100.0 % 10 10
Test Date: 2026-03-28 14:25:54 Functions: 100.0 % 3 3
Legend: Lines:     hit not hit

            Line data    Source code
       1              : 
       2              : // Copyright (C) 2026 Free Software Foundation, Inc.
       3              : 
       4              : // This file is part of GCC.
       5              : 
       6              : // GCC is free software; you can redistribute it and/or modify it under
       7              : // the terms of the GNU General Public License as published by the Free
       8              : // Software Foundation; either version 3, or (at your option) any later
       9              : // version.
      10              : 
      11              : // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      12              : // WARRANTY; without even the implied warranty of MERCHANTABILITY or
      13              : // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      14              : // for more details.
      15              : 
      16              : // You should have received a copy of the GNU General Public License
      17              : // along with GCC; see the file COPYING3.  If not see
      18              : // <http://www.gnu.org/licenses/>.
      19              : 
      20              : #include "rust-feature-store.h"
      21              : 
      22              : namespace Rust {
      23              : namespace Features {
      24              : 
      25              : EarlyFeatureGateStore &
      26         4525 : EarlyFeatureGateStore::get ()
      27              : {
      28         4525 :   static EarlyFeatureGateStore instance{};
      29         4525 :   return instance;
      30              : }
      31              : 
      32              : void
      33            4 : EarlyFeatureGateStore::add (Feature::Name name, Error error)
      34              : {
      35            4 :   potential_errors.emplace (name, error);
      36            4 : }
      37              : 
      38              : std::pair<Feature::Name, Error>
      39            4 : EarlyFeatureGateStore::get_error ()
      40              : {
      41            4 :   auto ret = potential_errors.front ();
      42            4 :   potential_errors.pop ();
      43            4 :   return ret;
      44              : }
      45              : 
      46              : } // namespace Features
      47              : } // namespace Rust
        

Generated by: LCOV version 2.4-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.