rust/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
558 B
Rust
Raw Normal View History

2022-11-13 06:10:36 -06:00
//@ rustc-env:CARGO_CRATE_NAME=rustc_dummy
#![feature(rustc_private)]
#![crate_type = "lib"]
extern crate rustc_span;
use rustc_span::symbol::Ident;
use rustc_span::Span;
extern crate rustc_macros;
use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
extern crate rustc_middle;
use rustc_middle::ty::Ty;
extern crate rustc_errors;
use rustc_errors::{Applicability, MultiSpan};
extern crate rustc_session;
#[derive(Diagnostic)]
#[diag(compiletest_example, code = E0123)]
2022-11-13 06:10:36 -06:00
//~^ ERROR diagnostic slug and crate name do not match
struct Hello {}