2023-10-16 03:05:11 -05:00
|
|
|
// Test the `rustc::span_use_eq_ctxt` internal lint
|
2023-09-25 02:15:00 -05:00
|
|
|
// compile-flags: -Z unstable-options
|
|
|
|
|
|
|
|
#![feature(rustc_private)]
|
|
|
|
#![deny(rustc::span_use_eq_ctxt)]
|
2023-10-16 03:05:11 -05:00
|
|
|
#![crate_type = "lib"]
|
2023-09-25 02:15:00 -05:00
|
|
|
|
|
|
|
extern crate rustc_span;
|
|
|
|
use rustc_span::Span;
|
|
|
|
|
|
|
|
pub fn f(s: Span, t: Span) -> bool {
|
2023-10-16 03:05:11 -05:00
|
|
|
s.ctxt() == t.ctxt() //~ ERROR use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
|
2023-09-25 02:15:00 -05:00
|
|
|
}
|