Skip to content

Rollup of 8 pull requests #137290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Feb 20, 2025
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0cd8694
Impl TryFrom<Vec<u8>> for String
elichai Oct 28, 2024
4c9b9d7
Use more explicit and reliable ptr select in sort impls
Voultapher Nov 3, 2024
5573cd3
Prevent /msys64/bin from being prepended to PATH
ChrisDenton Feb 10, 2025
ec8ec41
Print the environment a second time
ChrisDenton Feb 10, 2025
f3515fb
Remove ignored `#[must_use]` attributes from portable-simd
samueltardieu Feb 12, 2025
3e66ba7
Remove ignored `#[must_use]` attributes from Clippy
samueltardieu Feb 12, 2025
eec49bb
add MAX_LEN_UTF8 and MAX_LEN_UTF16 constants
HTGAzureX1212 Feb 2, 2024
09dc38f
Improve WTF-8 comments
thaliaarchi Feb 5, 2025
8b1a3a2
Simplify control flow with while-let
thaliaarchi Feb 6, 2025
05e4175
Synchronize platform adaptors for OsString/OsStr
thaliaarchi Feb 6, 2025
fe37ada
Suggest using :: instead of . in more cases.
zachs18 Jan 30, 2025
bfde43c
Suggest using :: instead of . for enums in some cases.
zachs18 Jan 31, 2025
ae7b45a
When giving a suggestion to use :: instead of . where the rhs is a ma…
zachs18 Jan 31, 2025
e639e88
Lint `#[must_use]` attributes applied to methods in trait impls
samueltardieu Feb 12, 2025
2c37250
Update `.` -> `::` tests for new diff suggestion format.
zachs18 Feb 11, 2025
e24833a
add test revisions for old-edition behavior of feature gates
dianne Jan 23, 2025
3e77657
remove old edition-2021-specific tests
dianne Jan 23, 2025
8dc64a4
"classic2021" and "structural2021" rulesets: add eat-inherited-ref-al…
dianne Jan 26, 2025
443c51d
"structural2021" ruleset: add fallback-to-outer (eat both) deref rule
dianne Jan 26, 2025
1ed74aa
add mixed-edition tests
dianne Jan 26, 2025
2c595d6
update unstable book
dianne Jan 26, 2025
799e0f7
add FIXMEs for diagnostic improvements
dianne Jan 31, 2025
2014962
"classic2021" ruleset: experimentally add fallback-to-outer (eat both)
dianne Jan 26, 2025
37bcc1c
clarify wording on doc comment
dianne Feb 17, 2025
0e758c4
rename `consider_inherited_ref_first` -> `consider_inherited_ref`
dianne Feb 17, 2025
0a15bfb
simplify fallback-to-outer condition on old editions
dianne Feb 17, 2025
84e9f29
Rollup merge of #120580 - HTGAzureX1212:HTGAzureX1212/issue-45795, r=…
matthiaskrgr Feb 19, 2025
7b7b1d4
Rollup merge of #132268 - elichai:string_try_from_vec, r=Amanieu
matthiaskrgr Feb 19, 2025
659838e
Rollup merge of #136093 - dianne:match-2024-for-edition-2021, r=Nadri…
matthiaskrgr Feb 19, 2025
8227910
Rollup merge of #136344 - zachs18:dot_notation_more_defkinds_3, r=dav…
matthiaskrgr Feb 19, 2025
59d2b10
Rollup merge of #136690 - Voultapher:use-more-explicit-and-reliable-p…
matthiaskrgr Feb 19, 2025
40379e2
Rollup merge of #136815 - ChrisDenton:fix-mingw-ci, r=Kobzol
matthiaskrgr Feb 19, 2025
c29cc60
Rollup merge of #136923 - samueltardieu:push-vxxqvqwspssv, r=davidtwco
matthiaskrgr Feb 19, 2025
3964bb1
Rollup merge of #137155 - thaliaarchi:wtf8-organize, r=ChrisDenton
matthiaskrgr Feb 19, 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
rename consider_inherited_ref_first -> consider_inherited_ref
  • Loading branch information
dianne committed Feb 19, 2025
commit 0e758c4ba6d9165106f6db768e23f01fabfd2d8c
10 changes: 5 additions & 5 deletions compiler/rustc_hir_typeck/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ enum InheritedRefMatchRule {
/// If `false`, a reference pattern is only matched against the underlying type.
/// This is `false` for stable Rust and `true` for both the `ref_pat_eat_one_layer_2024` and
/// `ref_pat_eat_one_layer_2024_structural` feature gates.
consider_inherited_ref_first: bool,
consider_inherited_ref: bool,
},
}

Expand All @@ -268,11 +268,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} else {
// Currently, matching against an inherited ref on edition 2024 is an error.
// Use `EatBoth` as a fallback to be similar to stable Rust.
InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: false }
InheritedRefMatchRule::EatBoth { consider_inherited_ref: false }
}
} else {
InheritedRefMatchRule::EatBoth {
consider_inherited_ref_first: self.tcx.features().ref_pat_eat_one_layer_2024()
consider_inherited_ref: self.tcx.features().ref_pat_eat_one_layer_2024()
|| self.tcx.features().ref_pat_eat_one_layer_2024_structural(),
}
}
Expand Down Expand Up @@ -2397,7 +2397,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
return expected;
}
}
InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: true } => {
InheritedRefMatchRule::EatBoth { consider_inherited_ref: true } => {
// Reset binding mode on old editions
pat_info.binding_mode = ByRef::No;

Expand Down Expand Up @@ -2437,7 +2437,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
return expected;
}
}
InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: false } => {
InheritedRefMatchRule::EatBoth { consider_inherited_ref: false } => {
// Reset binding mode on stable Rust. This will be a type error below if
// `expected` is not a reference type.
pat_info.binding_mode = ByRef::No;
Expand Down