Fix tests
This commit is contained in:
parent
6b6ad781f8
commit
869daad8fc
@ -1063,8 +1063,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||||||
}) => {}
|
}) => {}
|
||||||
// auto trait impl
|
// auto trait impl
|
||||||
AutoImplCandidate(..) => {}
|
AutoImplCandidate(..) => {}
|
||||||
// FIXME check if this is right, but this would allow Sized impls
|
// generator, this will raise error in other places
|
||||||
// BuiltinCandidate { .. } => {}
|
// or ignore error with const_async_blocks feature
|
||||||
|
GeneratorCandidate => {}
|
||||||
_ => {
|
_ => {
|
||||||
// reject all other types of candidates
|
// reject all other types of candidates
|
||||||
return Err(Unimplemented);
|
return Err(Unimplemented);
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
// issue-49296: Unsafe shenigans in constants can result in missing errors
|
// issue-49296: Unsafe shenigans in constants can result in missing errors
|
||||||
|
|
||||||
#![feature(const_fn_trait_bound)]
|
#![feature(const_fn_trait_bound)]
|
||||||
|
#![feature(const_trait_bound_opt_out)]
|
||||||
|
#![allow(incomplete_features)]
|
||||||
|
|
||||||
const unsafe fn transmute<T: Copy, U: Copy>(t: T) -> U {
|
const unsafe fn transmute<T: ?const Copy, U: ?const Copy>(t: T) -> U {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
union Transmute<T: Copy, U: Copy> {
|
union Transmute<T: Copy, U: Copy> {
|
||||||
from: T,
|
from: T,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0080]: evaluation of constant value failed
|
error[E0080]: evaluation of constant value failed
|
||||||
--> $DIR/issue-49296.rs:18:16
|
--> $DIR/issue-49296.rs:20:16
|
||||||
|
|
|
|
||||||
LL | const X: u64 = *wat(42);
|
LL | const X: u64 = *wat(42);
|
||||||
| ^^^^^^^^ pointer to alloc2 was dereferenced after this allocation got freed
|
| ^^^^^^^^ pointer to alloc2 was dereferenced after this allocation got freed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user