@@ -40,54 +40,5 @@ LL | impl<T: ~const Default + ~const Sub> const A for T {
4040 |
4141 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4242
43- error[E0015]: cannot call non-const fn `<() as A>::a` in constants
44- --> $DIR/const_trait_impl.rs:52:23
45- |
46- LL | const _: () = assert!(<()>::a() == 42);
47- | ^^^^^^^^^
48- |
49- = note: calls in constants are limited to constant functions, tuple structs and tuple variants
50- help: add `#![feature(effects)]` to the crate attributes to enable
51- |
52- LL + #![feature(effects)]
53- |
54-
55- error[E0015]: cannot call non-const fn `<u8 as A>::a` in constants
56- --> $DIR/const_trait_impl.rs:53:23
57- |
58- LL | const _: () = assert!(<u8>::a() == 3);
59- | ^^^^^^^^^
60- |
61- = note: calls in constants are limited to constant functions, tuple structs and tuple variants
62- help: add `#![feature(effects)]` to the crate attributes to enable
63- |
64- LL + #![feature(effects)]
65- |
66-
67- error[E0015]: cannot call non-const fn `<u16 as A>::a` in constants
68- --> $DIR/const_trait_impl.rs:54:23
69- |
70- LL | const _: () = assert!(<u16>::a() == 2);
71- | ^^^^^^^^^^
72- |
73- = note: calls in constants are limited to constant functions, tuple structs and tuple variants
74- help: add `#![feature(effects)]` to the crate attributes to enable
75- |
76- LL + #![feature(effects)]
77- |
78-
79- error[E0015]: cannot call non-const fn `<T as Sup>::foo` in constant functions
80- --> $DIR/const_trait_impl.rs:48:9
81- |
82- LL | T::foo()
83- | ^^^^^^^^
84- |
85- = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
86- help: add `#![feature(effects)]` to the crate attributes to enable
87- |
88- LL + #![feature(effects)]
89- |
90-
91- error: aborting due to 10 previous errors
43+ error: aborting due to 6 previous errors
9244
93- For more information about this error, try `rustc --explain E0015`.
0 commit comments