Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Jul 26, 2021
1 parent 6c5eae4 commit cdbe28e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions compiler/rustc_trait_selection/src/traits/select/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
}) => {}
// auto trait impl
AutoImplCandidate(..) => {}
// FIXME check if this is right, but this would allow Sized impls
// BuiltinCandidate { .. } => {}
// generator, this will raise error in other places
// or ignore error with const_async_blocks feature
GeneratorCandidate => {}
_ => {
// reject all other types of candidates
return Err(Unimplemented);
Expand Down
4 changes: 3 additions & 1 deletion src/test/ui/consts/const-eval/issue-49296.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

#![feature(const_fn_union)]
#![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)]
union Transmute<T: Copy, U: Copy> {
from: T,
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/const-eval/issue-49296.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0080]: evaluation of constant value failed
--> $DIR/issue-49296.rs:19:16
--> $DIR/issue-49296.rs:21:16
|
LL | const X: u64 = *wat(42);
| ^^^^^^^^ pointer to alloc2 was dereferenced after this allocation got freed
Expand Down

0 comments on commit cdbe28e

Please sign in to comment.