Skip to content

Commit cdbe28e

Browse files
committed
Fix tests
1 parent 6c5eae4 commit cdbe28e

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

compiler/rustc_trait_selection/src/traits/select/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10631063
}) => {}
10641064
// auto trait impl
10651065
AutoImplCandidate(..) => {}
1066-
// FIXME check if this is right, but this would allow Sized impls
1067-
// BuiltinCandidate { .. } => {}
1066+
// generator, this will raise error in other places
1067+
// or ignore error with const_async_blocks feature
1068+
GeneratorCandidate => {}
10681069
_ => {
10691070
// reject all other types of candidates
10701071
return Err(Unimplemented);

src/test/ui/consts/const-eval/issue-49296.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
#![feature(const_fn_union)]
44
#![feature(const_fn_trait_bound)]
5+
#![feature(const_trait_bound_opt_out)]
6+
#![allow(incomplete_features)]
57

6-
const unsafe fn transmute<T: Copy, U: Copy>(t: T) -> U {
8+
const unsafe fn transmute<T: ?const Copy, U: ?const Copy>(t: T) -> U {
79
#[repr(C)]
810
union Transmute<T: Copy, U: Copy> {
911
from: T,

src/test/ui/consts/const-eval/issue-49296.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0080]: evaluation of constant value failed
2-
--> $DIR/issue-49296.rs:19:16
2+
--> $DIR/issue-49296.rs:21:16
33
|
44
LL | const X: u64 = *wat(42);
55
| ^^^^^^^^ pointer to alloc2 was dereferenced after this allocation got freed

0 commit comments

Comments
 (0)