rust/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
Jakub Beránek c2524bc689
Fix span_use_eq_ctxt test
The stage0 compiler does not know about the lint yet, so ignore the test on stage1.
2023-10-19 10:41:20 +02:00

16 lines
385 B
Rust

// Test the `rustc::span_use_eq_ctxt` internal lint
// #[cfg(bootstrap)]
// ignore-stage1
// compile-flags: -Z unstable-options
#![feature(rustc_private)]
#![deny(rustc::span_use_eq_ctxt)]
#![crate_type = "lib"]
extern crate rustc_span;
use rustc_span::Span;
pub fn f(s: Span, t: Span) -> bool {
s.ctxt() == t.ctxt() //~ ERROR use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
}