diff options
| author | bors <bors@rust-lang.org> | 2023-04-16 06:25:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-16 06:25:14 +0000 |
| commit | e6e956dade79bdc084dfe3078abab24656a1b483 (patch) | |
| tree | 160c2d714b88f79ecaf3af7a7f6721379101ec97 /compiler | |
| parent | 2a711152615ad9294dc0e5ee6885c8e9bb8418a9 (diff) | |
| parent | 312cad1f74c3abc6fb273e7dfcf1c52ddef25666 (diff) | |
Auto merge of #110390 - fee1-dead-contrib:rollup-kh2ov9r, r=fee1-dead
Rollup of 3 pull requests Successful merges: - #110376 (Convert comment to doc comment on `Interner::get`.) - #110379 (Update some ignored tests.) - #110387 (Don't `use rustc_hir as ast`(!)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/relate.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 5 |
2 files changed, 10 insertions, 9 deletions
diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs index 46c931d61dc..c6d10f4741a 100644 --- a/compiler/rustc_middle/src/ty/relate.rs +++ b/compiler/rustc_middle/src/ty/relate.rs @@ -7,7 +7,7 @@ use crate::ty::error::{ExpectedFound, TypeError}; use crate::ty::{self, Expr, ImplSubject, Term, TermKind, Ty, TyCtxt, TypeFoldable}; use crate::ty::{GenericArg, GenericArgKind, SubstsRef}; -use rustc_hir as ast; +use rustc_hir as hir; use rustc_hir::def_id::DefId; use rustc_target::spec::abi; use std::iter; @@ -123,8 +123,8 @@ pub fn relate_type_and_mut<'tcx, R: TypeRelation<'tcx>>( } else { let mutbl = a.mutbl; let (variance, info) = match mutbl { - ast::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None), - ast::Mutability::Mut => { + hir::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None), + hir::Mutability::Mut => { (ty::Invariant, ty::VarianceDiagInfo::Invariant { ty: base_ty, param_index: 0 }) } }; @@ -239,12 +239,12 @@ impl<'tcx> Relate<'tcx> for ty::BoundConstness { } } -impl<'tcx> Relate<'tcx> for ast::Unsafety { +impl<'tcx> Relate<'tcx> for hir::Unsafety { fn relate<R: TypeRelation<'tcx>>( relation: &mut R, - a: ast::Unsafety, - b: ast::Unsafety, - ) -> RelateResult<'tcx, ast::Unsafety> { + a: hir::Unsafety, + b: hir::Unsafety, + ) -> RelateResult<'tcx, hir::Unsafety> { if a != b { Err(TypeError::UnsafetyMismatch(expected_found(relation, a, b))) } else { diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 6bfae377152..6ce0b66ef6a 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1986,8 +1986,9 @@ impl Interner { name } - // Get the symbol as a string. `Symbol::as_str()` should be used in - // preference to this function. + /// Get the symbol as a string. + /// + /// [`Symbol::as_str()`] should be used in preference to this function. fn get(&self, symbol: Symbol) -> &str { self.0.lock().strings[symbol.0.as_usize()] } |
