LCOV - code coverage report
Current view: top level - gcc/rust/typecheck - rust-tyty-bounds.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 100.0 % 1 1
Test Date: 2024-03-23 14:05:01 Functions: - 0 0
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : // Copyright (C) 2020-2024 Free Software Foundation, Inc.
       2                 :             : 
       3                 :             : // This file is part of GCC.
       4                 :             : 
       5                 :             : // GCC is free software; you can redistribute it and/or modify it under
       6                 :             : // the terms of the GNU General Public License as published by the Free
       7                 :             : // Software Foundation; either version 3, or (at your option) any later
       8                 :             : // version.
       9                 :             : 
      10                 :             : // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      11                 :             : // WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12                 :             : // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      13                 :             : // for more details.
      14                 :             : 
      15                 :             : // You should have received a copy of the GNU General Public License
      16                 :             : // along with GCC; see the file COPYING3.  If not see
      17                 :             : // <http://www.gnu.org/licenses/>.
      18                 :             : 
      19                 :             : #ifndef RUST_TYTY_BOUNDS_H
      20                 :             : #define RUST_TYTY_BOUNDS_H
      21                 :             : 
      22                 :             : #include "rust-location.h"
      23                 :             : #include "rust-mapping-common.h"
      24                 :             : 
      25                 :             : namespace Rust {
      26                 :             : 
      27                 :             : namespace Resolver {
      28                 :             : class TraitReference;
      29                 :             : class TraitItemReference;
      30                 :             : class AssociatedImplTrait;
      31                 :             : } // namespace Resolver
      32                 :             : 
      33                 :             : namespace TyTy {
      34                 :             : 
      35                 :             : class BaseType;
      36                 :             : class TypeBoundPredicate;
      37                 :             : class TypeBoundPredicateItem
      38                 :             : {
      39                 :             : public:
      40                 :             :   TypeBoundPredicateItem (const TypeBoundPredicate *parent,
      41                 :             :                           const Resolver::TraitItemReference *trait_item_ref);
      42                 :             : 
      43                 :             :   static TypeBoundPredicateItem error ();
      44                 :             : 
      45                 :             :   bool is_error () const;
      46                 :             : 
      47                 :             :   BaseType *get_tyty_for_receiver (const TyTy::BaseType *receiver);
      48                 :             : 
      49                 :             :   const Resolver::TraitItemReference *get_raw_item () const;
      50                 :             : 
      51                 :             :   bool needs_implementation () const;
      52                 :             : 
      53                 :             :   const TypeBoundPredicate *get_parent () const;
      54                 :             : 
      55                 :             :   location_t get_locus () const;
      56                 :             : 
      57                 :             : private:
      58                 :             :   const TypeBoundPredicate *parent;
      59                 :             :   const Resolver::TraitItemReference *trait_item_ref;
      60                 :             : };
      61                 :             : 
      62                 :       44256 : class TypeBoundsMappings
      63                 :             : {
      64                 :             : protected:
      65                 :             :   TypeBoundsMappings (std::vector<TypeBoundPredicate> specified_bounds);
      66                 :             : 
      67                 :             : public:
      68                 :             :   std::vector<TypeBoundPredicate> &get_specified_bounds ();
      69                 :             : 
      70                 :             :   const std::vector<TypeBoundPredicate> &get_specified_bounds () const;
      71                 :             : 
      72                 :             :   TypeBoundPredicate lookup_predicate (DefId id);
      73                 :             : 
      74                 :             :   size_t num_specified_bounds () const;
      75                 :             : 
      76                 :             :   std::string raw_bounds_as_string () const;
      77                 :             : 
      78                 :             :   std::string bounds_as_string () const;
      79                 :             : 
      80                 :             :   std::string raw_bounds_as_name () const;
      81                 :             : 
      82                 :             : protected:
      83                 :             :   void add_bound (TypeBoundPredicate predicate);
      84                 :             : 
      85                 :             :   std::vector<TypeBoundPredicate> specified_bounds;
      86                 :             : };
      87                 :             : 
      88                 :             : } // namespace TyTy
      89                 :             : } // namespace Rust
      90                 :             : 
      91                 :             : #endif // RUST_TYTY_BOUNDS_H
        

Generated by: LCOV version 2.0-1

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.