Skip to content
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

Rollup of 9 pull requests #93218

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a4bff74
Test not never
dtolnay Nov 22, 2021
9e83478
impl Not for !
dtolnay Nov 22, 2021
881e093
Replace ! with * in ui test of unary expr reachability
dtolnay Nov 22, 2021
ef472f1
Stabilize arc_new_cyclic
bdbai Dec 13, 2021
ce31cbc
use generic params for arc_new_cyclic
bdbai Dec 30, 2021
91d8086
[debuginfo] Fix and unify handling of fat pointers in debuginfo.
michaelwoerister Jan 13, 2022
756a70c
Fix vec-slices debuginfo test for GDB.
michaelwoerister Jan 17, 2022
7356e28
Tweak `expr.await` desugaring `Span`
estebank Jan 20, 2022
3136c5f
Update stabilization version of impl Not for !
dtolnay Jan 20, 2022
89f6778
[debuginfo] Fix and unify handling of fat pointers in debuginfo: addr…
michaelwoerister Jan 21, 2022
f0525da
Unify search input and buttons size
GuillaumeGomez Jan 20, 2022
ee6c33c
Fix spacing for `·` between stability and source
jsha Jan 19, 2022
fc16b81
rustdoc: Make some `pub` items crate-private
camelid Jan 22, 2022
9427ccb
Remove dead code from build_helper
mati865 Jan 22, 2022
00e191c
Update stabilization version of arc_new_cyclic
m-ou-se Jan 22, 2022
ab5437e
update uclibc instructions for new toolchain, add link from platforms…
skrap Jan 21, 2022
dd9c6ad
Rollup merge of #90666 - bdbai:arc_new_cyclic, r=m-ou-se
matthiaskrgr Jan 22, 2022
c8be801
Rollup merge of #91122 - dtolnay:not, r=m-ou-se
matthiaskrgr Jan 22, 2022
9681796
Rollup merge of #93006 - michaelwoerister:fix-unsized-ptr-debuginfo, …
matthiaskrgr Jan 22, 2022
224c6ac
Rollup merge of #93068 - jsha:dot-spacing, r=GuillaumeGomez
matthiaskrgr Jan 22, 2022
c69e60f
Rollup merge of #93103 - estebank:await-span, r=nagisa
matthiaskrgr Jan 22, 2022
e0aa2e6
Rollup merge of #93113 - GuillaumeGomez:unify-sizes, r=jsha
matthiaskrgr Jan 22, 2022
e2779a6
Rollup merge of #93168 - skrap:master, r=Amanieu
matthiaskrgr Jan 22, 2022
7a45413
Rollup merge of #93185 - camelid:crate-private, r=GuillaumeGomez
matthiaskrgr Jan 22, 2022
74486e3
Rollup merge of #93196 - mati865:remove-build_helper-dead-code, r=Mar…
matthiaskrgr Jan 22, 2022
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
20 changes: 10 additions & 10 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,18 +625,18 @@ impl<'hir> LoweringContext<'_, 'hir> {
/// }
/// }
/// ```
fn lower_expr_await(&mut self, await_span: Span, expr: &Expr) -> hir::ExprKind<'hir> {
let dot_await_span = expr.span.shrink_to_hi().to(await_span);
fn lower_expr_await(&mut self, dot_await_span: Span, expr: &Expr) -> hir::ExprKind<'hir> {
let full_span = expr.span.to(dot_await_span);
match self.generator_kind {
Some(hir::GeneratorKind::Async(_)) => {}
Some(hir::GeneratorKind::Gen) | None => {
let mut err = struct_span_err!(
self.sess,
await_span,
dot_await_span,
E0728,
"`await` is only allowed inside `async` functions and blocks"
);
err.span_label(await_span, "only allowed inside `async` functions and blocks");
err.span_label(dot_await_span, "only allowed inside `async` functions and blocks");
if let Some(item_sp) = self.current_item {
err.span_label(item_sp, "this is not `async`");
}
Expand All @@ -646,7 +646,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let span = self.mark_span_with_reason(DesugaringKind::Await, dot_await_span, None);
let gen_future_span = self.mark_span_with_reason(
DesugaringKind::Await,
await_span,
full_span,
self.allow_gen_future.clone(),
);
let expr = self.lower_expr_mut(expr);
Expand Down Expand Up @@ -699,9 +699,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
let loop_hir_id = self.lower_node_id(loop_node_id);
let ready_arm = {
let x_ident = Ident::with_dummy_span(sym::result);
let (x_pat, x_pat_hid) = self.pat_ident(span, x_ident);
let x_expr = self.expr_ident(span, x_ident, x_pat_hid);
let ready_field = self.single_pat_field(span, x_pat);
let (x_pat, x_pat_hid) = self.pat_ident(gen_future_span, x_ident);
let x_expr = self.expr_ident(gen_future_span, x_ident, x_pat_hid);
let ready_field = self.single_pat_field(gen_future_span, x_pat);
let ready_pat = self.pat_lang_item_variant(
span,
hir::LangItem::PollReady,
Expand All @@ -711,7 +711,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let break_x = self.with_loop_scope(loop_node_id, move |this| {
let expr_break =
hir::ExprKind::Break(this.lower_loop_destination(None), Some(x_expr));
this.arena.alloc(this.expr(span, expr_break, ThinVec::new()))
this.arena.alloc(this.expr(gen_future_span, expr_break, ThinVec::new()))
});
self.arm(ready_pat, break_x)
};
Expand Down Expand Up @@ -783,7 +783,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
// `match ::std::future::IntoFuture::into_future(<expr>) { ... }`
let into_future_span = self.mark_span_with_reason(
DesugaringKind::Await,
await_span,
dot_await_span,
self.allow_into_future.clone(),
);
let into_future_expr = self.expr_call_lang_item_fn(
Expand Down
Loading