Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f0d9ae4

Browse files
committedNov 29, 2024··
Merge remote-tracking branch 'origin' into split-x86_64-msvc
2 parents 02bf397 + 0c4f3a4 commit f0d9ae4

File tree

606 files changed

+3597
-4034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

606 files changed

+3597
-4034
lines changed
 

‎Cargo.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3820,7 +3820,6 @@ dependencies = [
38203820
name = "rustc_index"
38213821
version = "0.0.0"
38223822
dependencies = [
3823-
"arrayvec",
38243823
"rustc_index_macros",
38253824
"rustc_macros",
38263825
"rustc_serialize",
@@ -4137,6 +4136,7 @@ name = "rustc_monomorphize"
41374136
version = "0.0.0"
41384137
dependencies = [
41394138
"rustc_abi",
4139+
"rustc_attr",
41404140
"rustc_data_structures",
41414141
"rustc_errors",
41424142
"rustc_fluent_macro",

‎compiler/rustc_ast/src/ast.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,14 +1184,15 @@ pub struct Expr {
11841184
}
11851185

11861186
impl Expr {
1187-
/// Is this expr either `N`, or `{ N }`.
1187+
/// Could this expr be either `N`, or `{ N }`, where `N` is a const parameter.
11881188
///
11891189
/// If this is not the case, name resolution does not resolve `N` when using
11901190
/// `min_const_generics` as more complex expressions are not supported.
11911191
///
11921192
/// Does not ensure that the path resolves to a const param, the caller should check this.
1193-
pub fn is_potential_trivial_const_arg(&self, strip_identity_block: bool) -> bool {
1194-
let this = if strip_identity_block { self.maybe_unwrap_block() } else { self };
1193+
/// This also does not consider macros, so it's only correct after macro-expansion.
1194+
pub fn is_potential_trivial_const_arg(&self) -> bool {
1195+
let this = self.maybe_unwrap_block();
11951196

11961197
if let ExprKind::Path(None, path) = &this.kind
11971198
&& path.is_potential_trivial_const_arg()

0 commit comments

Comments
 (0)
Please sign in to comment.