Skip to content

Commit e6e956d

Browse files
committed
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
2 parents 2a71115 + 312cad1 commit e6e956d

File tree

26 files changed

+49
-39
lines changed

26 files changed

+49
-39
lines changed

compiler/rustc_middle/src/ty/relate.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use crate::ty::error::{ExpectedFound, TypeError};
88
use crate::ty::{self, Expr, ImplSubject, Term, TermKind, Ty, TyCtxt, TypeFoldable};
99
use crate::ty::{GenericArg, GenericArgKind, SubstsRef};
10-
use rustc_hir as ast;
10+
use rustc_hir as hir;
1111
use rustc_hir::def_id::DefId;
1212
use rustc_target::spec::abi;
1313
use std::iter;
@@ -123,8 +123,8 @@ pub fn relate_type_and_mut<'tcx, R: TypeRelation<'tcx>>(
123123
} else {
124124
let mutbl = a.mutbl;
125125
let (variance, info) = match mutbl {
126-
ast::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None),
127-
ast::Mutability::Mut => {
126+
hir::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None),
127+
hir::Mutability::Mut => {
128128
(ty::Invariant, ty::VarianceDiagInfo::Invariant { ty: base_ty, param_index: 0 })
129129
}
130130
};
@@ -239,12 +239,12 @@ impl<'tcx> Relate<'tcx> for ty::BoundConstness {
239239
}
240240
}
241241

242-
impl<'tcx> Relate<'tcx> for ast::Unsafety {
242+
impl<'tcx> Relate<'tcx> for hir::Unsafety {
243243
fn relate<R: TypeRelation<'tcx>>(
244244
relation: &mut R,
245-
a: ast::Unsafety,
246-
b: ast::Unsafety,
247-
) -> RelateResult<'tcx, ast::Unsafety> {
245+
a: hir::Unsafety,
246+
b: hir::Unsafety,
247+
) -> RelateResult<'tcx, hir::Unsafety> {
248248
if a != b {
249249
Err(TypeError::UnsafetyMismatch(expected_found(relation, a, b)))
250250
} else {

compiler/rustc_span/src/symbol.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1986,8 +1986,9 @@ impl Interner {
19861986
name
19871987
}
19881988

1989-
// Get the symbol as a string. `Symbol::as_str()` should be used in
1990-
// preference to this function.
1989+
/// Get the symbol as a string.
1990+
///
1991+
/// [`Symbol::as_str()`] should be used in preference to this function.
19911992
fn get(&self, symbol: Symbol) -> &str {
19921993
self.0.lock().strings[symbol.0.as_usize()]
19931994
}

tests/mir-opt/simplify_arm.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
// EMIT_MIR simplify_arm.id_try.SimplifyArmIdentity.diff
77
// EMIT_MIR simplify_arm.id_try.SimplifyBranchSame.diff
88

9-
// This pass is broken since deaggregation changed
10-
// ignore-test
9+
// ignore-test This pass is broken since deaggregation changed
1110

1211
fn id(o: Option<u8>) -> Option<u8> {
1312
match o {

tests/mir-opt/simplify_arm_identity.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
// compile-flags: -Zmir-opt-level=3
55
// EMIT_MIR_FOR_EACH_BIT_WIDTH
66

7-
// This pass is broken since deaggregation changed
8-
// ignore-test
7+
// ignore-test This pass is broken since deaggregation changed
98

109
enum Src {
1110
Foo(u8),

tests/ui/borrowck/move-error-snippets-ext.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
macro_rules! aaa {
44
($c:ident) => {{

tests/ui/codemap_tests/two_files_data.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
trait Foo { }
44

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
#![cfg_attr(all(), cfg(FALSE))]

tests/ui/cross/cross-file-errors/main.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: in expressions, `_` can only be used on the left-hand side of an assignment
2-
--> $DIR/underscore.rs:8:9
2+
--> $DIR/underscore.rs:6:9
33
|
44
LL | _
55
| ^ `_` not allowed here

tests/ui/cross/cross-file-errors/underscore.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// We want this file only so we can test cross-file error
2-
// messages, but we don't want it in an external crate.
3-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
42
#![crate_type = "lib"]
53

64
macro_rules! underscore {

tests/ui/inline-const/const-match-pat-lifetime-err.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (This is currently broken)
22

33
#![allow(incomplete_features)]
44
#![feature(const_mut_refs)]

tests/ui/issues/issue-49298.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// where #54986 is implemented and #54987 is *not* implemented. For
77
// now: just ignore it
88
//
9-
// ignore-test
9+
// ignore-test (#54987)
1010

1111
// This test is checking that the space allocated for `x.1` does not
1212
// overlap with `y`. (The reason why such a thing happened at one

tests/ui/issues/issue-59756.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
// ignore-test
2+
// ignore-test (rustfix needs multiple suggestions)
33
//
44
// FIXME: Re-enable this test once we support choosing
55
// between multiple mutually exclusive suggestions for the same span
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// ignore-test FIXME(#20574)
2-
31
#![deny(unreachable_code)]
42

53
fn main() {
6-
let x = || panic!();
4+
let x = || -> ! { panic!() };
75
x();
86
println!("Foo bar"); //~ ERROR: unreachable statement
97
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
error: unreachable statement
2+
--> $DIR/closure-bang.rs:6:5
3+
|
4+
LL | x();
5+
| --- any code following this expression is unreachable
6+
LL | println!("Foo bar");
7+
| ^^^^^^^^^^^^^^^^^^^ unreachable statement
8+
|
9+
note: the lint level is defined here
10+
--> $DIR/closure-bang.rs:1:9
11+
|
12+
LL | #![deny(unreachable_code)]
13+
| ^^^^^^^^^^^^^^^^
14+
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
15+
16+
error: aborting due to previous error
17+

tests/ui/macros/macro-expanded-include/foo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
macro_rules! m {
44
() => { include!("file.txt"); }

tests/ui/match/issue-26996.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// where #54986 is implemented and #54987 is *not* implemented. For
55
// now: just ignore it
66
//
7-
// ignore-test
7+
// ignore-test (#54987)
88

99
// This test is checking that the write to `c.0` (which has been moved out of)
1010
// won't overwrite the state in `c2`.

tests/ui/match/issue-27021.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// where #54986 is implemented and #54987 is *not* implemented. For
55
// now: just ignore it
66
//
7-
// ignore-test
7+
// ignore-test (#54987)
88

99
// These are variants of issue-26996.rs. In all cases we are writing
1010
// into a record field that has been moved out of, and ensuring that

tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
// Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction.
44
//

tests/ui/panics/panic-short-backtrace-windows-x86_64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This test has been spuriously failing a lot recently (#92000).
22
// Ignore it until the underlying issue is fixed.
3-
// ignore-test
3+
// ignore-test (#92000)
44

55
// Regression test for #87481: short backtrace formatting cut off the entire stack trace.
66

tests/ui/proc-macro/module.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
#![rustfmt::skip]
44
#![print_attr]

tests/ui/proc-macro/outer/inner.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)

tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
#[derive(Print)]
44
enum ProceduralMasqueradeDummyType {

tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
#[derive(Print)]
44
enum ProceduralMasqueradeDummyType {

tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-test
1+
// ignore-test (auxiliary, used by other tests)
22

33
#[derive(Print)]
44
enum ProceduralMasqueradeDummyType {

tests/ui/type-alias-impl-trait/issue-65918.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// ignore-test: This now ICEs again.
2-
31
// build-pass
42

53
#![feature(type_alias_impl_trait)]

0 commit comments

Comments
 (0)