File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 196196//
197197// Language features:
198198// tidy-alphabetical-start
199- #![ cfg_attr( not( bootstrap) , feature( effects) ) ]
200199#![ feature( abi_unadjusted) ]
201200#![ feature( adt_const_params) ]
202201#![ feature( allow_internal_unsafe) ]
Original file line number Diff line number Diff line change 1+ //! Ensure we don't allow accessing const effect parameters from stable Rust.
2+
3+ fn main ( ) {
4+ i8:: checked_sub :: < true > ( 42 , 43 ) ;
5+ //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
6+ }
7+
8+ const FOO : ( ) = {
9+ i8:: checked_sub :: < false > ( 42 , 43 ) ;
10+ //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
11+ } ;
Original file line number Diff line number Diff line change 1+ error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
2+ --> $DIR/effect_param.rs:9:9
3+ |
4+ LL | i8::checked_sub::<false>(42, 43);
5+ | ^^^^^^^^^^^--------- help: remove these generics
6+ | |
7+ | expected 0 generic arguments
8+
9+ error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
10+ --> $DIR/effect_param.rs:4:9
11+ |
12+ LL | i8::checked_sub::<true>(42, 43);
13+ | ^^^^^^^^^^^-------- help: remove these generics
14+ | |
15+ | expected 0 generic arguments
16+
17+ error: aborting due to 2 previous errors
18+
19+ For more information about this error, try `rustc --explain E0107`.
You can’t perform that action at this time.
0 commit comments