1
Fork 0

Rollup merge of #122813 - nnethercote:nicer-quals, r=compiler-errors

Qualifier tweaking

Adding and removing qualifiers in some cases that make things nicer. Details in individual commits.

r? `@compiler-errors`
This commit is contained in:
Matthias Krüger 2024-04-17 05:44:52 +02:00 committed by GitHub
commit 45940fe6d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 346 additions and 399 deletions

View file

@ -3,6 +3,7 @@ use super::*;
use rustc_ast as ast;
use rustc_span::create_default_session_globals_then;
use rustc_span::symbol::Ident;
use rustc_span::DUMMY_SP;
use thin_vec::ThinVec;
fn fun_to_string(
@ -28,10 +29,7 @@ fn test_fun_to_string() {
create_default_session_globals_then(|| {
let abba_ident = Ident::from_str("abba");
let decl = ast::FnDecl {
inputs: ThinVec::new(),
output: ast::FnRetTy::Default(rustc_span::DUMMY_SP),
};
let decl = ast::FnDecl { inputs: ThinVec::new(), output: ast::FnRetTy::Default(DUMMY_SP) };
let generics = ast::Generics::default();
assert_eq!(
fun_to_string(&decl, ast::FnHeader::default(), abba_ident, &generics),
@ -48,7 +46,7 @@ fn test_variant_to_string() {
let var = ast::Variant {
ident,
vis: ast::Visibility {
span: rustc_span::DUMMY_SP,
span: DUMMY_SP,
kind: ast::VisibilityKind::Inherited,
tokens: None,
},
@ -56,7 +54,7 @@ fn test_variant_to_string() {
id: ast::DUMMY_NODE_ID,
data: ast::VariantData::Unit(ast::DUMMY_NODE_ID),
disr_expr: None,
span: rustc_span::DUMMY_SP,
span: DUMMY_SP,
is_placeholder: false,
};