Skip to content

Commit

Permalink
make test pass even though the span makes no sense
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 11, 2020
1 parent 54a6865 commit 7fed183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/compile-fail/erroneous_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
//! (https://github.com/rust-lang/miri/issues/1382)
#![feature(const_panic)]
#![feature(never_type)]
#![warn(const_err)]
#![warn(warnings, const_err)]

struct PrintName<T>(T);
impl<T> PrintName<T> {
const VOID: ! = panic!(); //~WARN any use of this value will cause an error
}

fn no_codegen<T>() {
if false {
let _ = PrintName::<T>::VOID; //~ERROR referenced constant has errors
if false { //~ERROR referenced constant has errors
let _ = PrintName::<T>::VOID;
}
}
fn main() {
Expand Down

0 comments on commit 7fed183

Please sign in to comment.