File tree 3 files changed +30
-1
lines changed
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 219
219
#![ feature( doc_cfg) ]
220
220
#![ feature( doc_cfg_hide) ]
221
221
#![ feature( doc_notable_trait) ]
222
- #![ feature( effects) ]
223
222
#![ feature( exhaustive_patterns) ]
224
223
#![ feature( extern_types) ]
225
224
#![ feature( fundamental) ]
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