mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 12:23:22 +00:00
15 lines
364 B
Rust
15 lines
364 B
Rust
// Test the `rustc::span_use_eq_ctxt` internal lint
|
|
// compile-flags: -Z unstable-options
|
|
// ignore-stage1
|
|
|
|
#![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()`
|
|
}
|