Skip to content

Commit caa57dd

Browse files
committed
Auto merge of rust-lang#3384 - rust-lang:rustup-2024-03-17, r=RalfJung
Automatic Rustup
2 parents 6d9549f + 0dff16a commit caa57dd

File tree

341 files changed

+4874
-3349
lines changed

Some content is hidden

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

341 files changed

+4874
-3349
lines changed

.github/workflows/dependencies.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
schedule:
77
# Run weekly
88
- cron: '0 0 * * Sun'
9+
# Re-bump deps every 4 hours
10+
- cron: '0 */4 * * *'
911
workflow_dispatch:
1012
# Needed so we can run it manually
1113
permissions:
@@ -135,8 +137,8 @@ jobs:
135137
gh pr edit cargo_update --title "${PR_TITLE}" --body-file body.md --repo $GITHUB_REPOSITORY
136138
137139
- name: open new pull request
138-
# Only run if there wasn't an existing PR
139-
if: steps.edit.outcome != 'success'
140+
# Only run if there wasn't an existing PR and if this is the weekly run
141+
if: steps.edit.outcome != 'success' && github.event.schedule == '0 0 * * Sun'
140142
env:
141143
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142144
run: gh pr create --title "${PR_TITLE}" --body-file body.md --repo $GITHUB_REPOSITORY

Cargo.lock

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4400,6 +4400,7 @@ dependencies = [
44004400
"rustc_lexer",
44014401
"rustc_macros",
44024402
"rustc_middle",
4403+
"rustc_privacy",
44034404
"rustc_session",
44044405
"rustc_span",
44054406
"rustc_target",
@@ -6279,12 +6280,14 @@ dependencies = [
62796280

62806281
[[package]]
62816282
name = "windows-bindgen"
6282-
version = "0.52.0"
6283+
version = "0.55.0"
62836284
source = "registry+https://github.com/rust-lang/crates.io-index"
6284-
checksum = "970efb0b6849eb8a87a898f586af7cc167567b070014c7434514c0bde0ca341c"
6285+
checksum = "073ff8a486ebad239d557809d2cd5fe5e04ee1de29e09c6cd83fb0bae19b8a4c"
62856286
dependencies = [
62866287
"proc-macro2",
62876288
"rayon",
6289+
"serde",
6290+
"serde_json",
62886291
"syn 2.0.52",
62896292
"windows-metadata",
62906293
]
@@ -6300,9 +6303,9 @@ dependencies = [
63006303

63016304
[[package]]
63026305
name = "windows-metadata"
6303-
version = "0.52.0"
6306+
version = "0.55.0"
63046307
source = "registry+https://github.com/rust-lang/crates.io-index"
6305-
checksum = "218fd59201e26acdbb894fa2b302d1de84bf3eec7d0eb894ac8e9c5a854ee4ef"
6308+
checksum = "b602635050172a1fc57a35040d4d225baefc6098fefd97094919921d95961a7d"
63066309

63076310
[[package]]
63086311
name = "windows-sys"

compiler/rustc_ast/src/util/literal.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,10 @@ fn filtered_float_lit(
276276
Some(suffix) => LitKind::Float(
277277
symbol,
278278
ast::LitFloatType::Suffixed(match suffix {
279+
sym::f16 => ast::FloatTy::F16,
279280
sym::f32 => ast::FloatTy::F32,
280281
sym::f64 => ast::FloatTy::F64,
282+
sym::f128 => ast::FloatTy::F128,
281283
_ => return Err(LitError::InvalidFloatSuffix(suffix)),
282284
}),
283285
),

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
373373
(trait_ref, lowered_ty)
374374
});
375375

376+
self.is_in_trait_impl = trait_ref.is_some();
376377
let new_impl_items = self
377378
.arena
378379
.alloc_from_iter(impl_items.iter().map(|item| self.lower_impl_item_ref(item)));
@@ -978,13 +979,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
978979
}
979980

980981
fn lower_impl_item_ref(&mut self, i: &AssocItem) -> hir::ImplItemRef {
981-
let trait_item_def_id = self
982-
.resolver
983-
.get_partial_res(i.id)
984-
.map(|r| r.expect_full_res().opt_def_id())
985-
.unwrap_or(None);
986-
self.is_in_trait_impl = trait_item_def_id.is_some();
987-
988982
hir::ImplItemRef {
989983
id: hir::ImplItemId { owner_id: hir::OwnerId { def_id: self.local_def_id(i.id) } },
990984
ident: self.lower_ident(i.ident),
@@ -1000,7 +994,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
1000994
},
1001995
AssocItemKind::MacCall(..) => unimplemented!(),
1002996
},
1003-
trait_item_def_id,
997+
trait_item_def_id: self
998+
.resolver
999+
.get_partial_res(i.id)
1000+
.map(|r| r.expect_full_res().opt_def_id())
1001+
.unwrap_or(None),
10041002
}
10051003
}
10061004

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15271527
generics,
15281528
body.as_deref(),
15291529
);
1530+
walk_list!(self, visit_attribute, &item.attrs);
15301531
self.visit_fn(kind, item.span, item.id);
15311532
}
15321533
AssocItemKind::Type(_) => {

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc_ast as ast;
22
use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
33
use rustc_ast::{attr, AssocConstraint, AssocConstraintKind, NodeId};
4-
use rustc_ast::{PatKind, RangeEnd};
4+
use rustc_ast::{token, PatKind, RangeEnd};
55
use rustc_feature::{AttributeGate, BuiltinAttribute, Features, GateIssue, BUILTIN_ATTRIBUTE_MAP};
66
use rustc_session::parse::{feature_err, feature_err_issue, feature_warn};
77
use rustc_session::Session;
@@ -378,6 +378,17 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
378378
ast::ExprKind::TryBlock(_) => {
379379
gate!(&self, try_blocks, e.span, "`try` expression is experimental");
380380
}
381+
ast::ExprKind::Lit(token::Lit { kind: token::LitKind::Float, suffix, .. }) => {
382+
match suffix {
383+
Some(sym::f16) => {
384+
gate!(&self, f16, e.span, "the type `f16` is unstable")
385+
}
386+
Some(sym::f128) => {
387+
gate!(&self, f128, e.span, "the type `f128` is unstable")
388+
}
389+
_ => (),
390+
}
391+
}
381392
_ => {}
382393
}
383394
visit::walk_expr(self, e)

compiler/rustc_borrowck/messages.ftl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ borrowck_borrow_due_to_use_closure =
1616
borrowck_borrow_due_to_use_coroutine =
1717
borrow occurs due to use in coroutine
1818
19+
borrowck_calling_operator_moves =
20+
calling this operator moves the value
21+
1922
borrowck_calling_operator_moves_lhs =
2023
calling this operator moves the left-hand side
2124

0 commit comments

Comments
 (0)