Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6f214c5
Fix pluralization of tests
Kobzol Mar 13, 2025
208cef4
Add note about the experimental status
Kobzol Mar 13, 2025
2192d5c
Print the compared SHAs
Kobzol Mar 13, 2025
7ed913b
Add cache for downloading job metrics
Kobzol Mar 13, 2025
5a7f227
Collapse report in `<details>`
Kobzol Mar 13, 2025
d5d633d
Group diffs by tests, rather than job groups
Kobzol Mar 13, 2025
f981a0a
Do not print doctest diffs in the report
Kobzol Mar 13, 2025
e885122
Add a pretty printing test for fn params.
nnethercote Mar 12, 2025
c437178
Create libgccjit.so.0 alias also for CI-downloaded GCC
Kobzol Mar 12, 2025
955aef5
Change GCC build flags
Kobzol Mar 12, 2025
3fc7ca0
Use GCC for building GCC
Kobzol Mar 13, 2025
34272a5
Do not overwrite original `config.toml` in `opt-dist`
Kobzol Mar 13, 2025
38fc116
Store libgccjit.so in a lib directory in the GCC CI tarball
Kobzol Mar 13, 2025
9714f60
Inline and remove `FnParam::name`.
nnethercote Mar 13, 2025
958bc7b
Handle `_` properly in a couple of places.
nnethercote Mar 13, 2025
bebd91f
Fix HIR param pretty printing some more.
nnethercote Mar 13, 2025
79e4be1
Remove the ref from `FnParam::Ident`.
nnethercote Mar 13, 2025
b9f0ca1
Refactor is_snake_case.
remexre Mar 14, 2025
d989bf5
rustc_target: Add target features for LoongArch v1.1
heiher Mar 5, 2025
aad1db7
Pass precise HirId when calling check_stability
xizheyin Mar 13, 2025
6ef465b
Add clarification about doctests
Kobzol Mar 14, 2025
bf095f6
Ensure that GCC is not built using Clang, as it misbehaves
Kobzol Mar 14, 2025
9e3805d
Mirror NetBSD sources
Kobzol Mar 14, 2025
66c49c7
Make `Parser::parse_expr_cond` public.
mohe2015 Mar 14, 2025
5da1ba4
Fix typo in hir lowering lint diag
yotamofek Mar 14, 2025
e6f7ab5
Small grammar fix in comment
yotamofek Mar 14, 2025
10055fb
Rollup merge of #138056 - heiher:loong64v1.1-features, r=petrochenkov
fmease Mar 14, 2025
fc7ac81
Rollup merge of #138451 - Kobzol:gcc-ci-build-gcc, r=GuillaumeGomez
fmease Mar 14, 2025
756b179
Rollup merge of #138454 - Kobzol:post-merge-workflow-fixes, r=jieyouxu
fmease Mar 14, 2025
43c41a8
Rollup merge of #138460 - xizheyin:issue-138319, r=petrochenkov
fmease Mar 14, 2025
03cda6b
Rollup merge of #138474 - remexre:refactor-is-snake-case, r=compiler-…
fmease Mar 14, 2025
370f8fb
Rollup merge of #138482 - nnethercote:fix-hir-printing, r=compiler-er…
fmease Mar 14, 2025
9b8a677
Rollup merge of #138507 - Kobzol:netbsd-mirror, r=Mark-Simulacrum
fmease Mar 14, 2025
7977592
Rollup merge of #138511 - mohe2015:rustc-parse-pub-parse-expr-cond, r…
fmease Mar 14, 2025
9838591
Rollup merge of #138518 - yotamofek:pr/hir-lint-typo, r=compiler-errors
fmease Mar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Pass precise HirId when calling check_stability
Signed-off-by: xizheyin <[email protected]>
  • Loading branch information
xizheyin committed Mar 14, 2025
commit aad1db737347b93b51a7dc45dcb6bec9e367bc02
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2060,7 +2060,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// struct-like enums (yet...), but it's definitely not
// a bug to have constructed one.
if adt_kind != AdtKind::Enum {
tcx.check_stability(v_field.did, Some(expr.hir_id), field.span, None);
tcx.check_stability(v_field.did, Some(field.hir_id), field.span, None);
}

self.field_ty(field.span, v_field, args)
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir_typeck/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

self.tcx.check_stability(
variant.fields[FieldIdx::from_usize(i)].did,
Some(pat.hir_id),
Some(subpat.hir_id),
subpat.span,
None,
);
Expand Down Expand Up @@ -1686,7 +1686,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
.get(&ident)
.map(|(i, f)| {
self.write_field_index(field.hir_id, *i);
self.tcx.check_stability(f.did, Some(pat.hir_id), span, None);
self.tcx.check_stability(f.did, Some(field.hir_id), span, None);
self.field_ty(span, f, args)
})
.unwrap_or_else(|| {
Expand Down
12 changes: 12 additions & 0 deletions tests/ui/pattern/check-struct-pat-fields-stability-issue-138319.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//@ check-pass
struct Point {
#[deprecated = "x is deprecated"]
_x: i32,
_y: i32,
}

fn main() {
let p = Point { _x: 1, _y: 2 }; //~ WARNING use of deprecated field `Point::_x`
// Before fix, it report an warning
let Point { #[expect(deprecated)]_x, .. } = p;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
warning: use of deprecated field `Point::_x`: x is deprecated
--> $DIR/check-struct-pat-fields-stability-issue-138319.rs:9:21
|
LL | let p = Point { _x: 1, _y: 2 };
| ^^^^^
|
= note: `#[warn(deprecated)]` on by default

warning: 1 warning emitted

39 changes: 39 additions & 0 deletions tests/ui/stability-attribute/check-stability-issue-138319.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//@ check-pass
fn _foo() {
_Bar { //~ WARNING use of deprecated struct `_Bar`: reason
#[expect(deprecated)]
foo: 0,
};
}

#[deprecated = "reason"]
struct _Bar {
foo: u32,
}

fn _foo2() {
#[expect(deprecated)]
_Bar2 {
foo2: 0,
};
}

#[deprecated = "reason"]
struct _Bar2 {
foo2: u32,
}

fn _foo3() {
_Bar3 {
#[expect(deprecated)]
foo3: 0,
};
}

struct _Bar3 {
#[deprecated = "reason"]
foo3: u32,
}


fn main() {}
10 changes: 10 additions & 0 deletions tests/ui/stability-attribute/check-stability-issue-138319.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
warning: use of deprecated struct `_Bar`: reason
--> $DIR/check-stability-issue-138319.rs:3:5
|
LL | _Bar {
| ^^^^
|
= note: `#[warn(deprecated)]` on by default

warning: 1 warning emitted

Loading