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 11 pull requests #124204

Closed
wants to merge 78 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
b4a4645
static_mut_refs: use raw pointers to remove the remaining FIXME
RalfJung Apr 15, 2024
89117f8
Use fake libc in core test
ChrisDenton Apr 15, 2024
232eb59
lint-docs: Add redirects for renamed lints.
ehuss Apr 15, 2024
20f4182
Preparing for merge from rustc
Apr 16, 2024
a1f523d
Merge from rustc
Apr 16, 2024
3d3a584
bless test-cargo-miri
RalfJung Apr 16, 2024
88d1a1c
Auto merge of #3469 - rust-lang:rustup-2024-04-16, r=RalfJung
bors Apr 16, 2024
3d5aceb
threads: keep track of why we are blocked, and sanity-check that when…
RalfJung Apr 16, 2024
1129fac
Auto merge of #3471 - RalfJung:blocked, r=RalfJung
bors Apr 16, 2024
811d4de
deadlock: show backtrace for all threads
RalfJung Apr 16, 2024
fee494b
Auto merge of #3472 - RalfJung:deadlock, r=RalfJung
bors Apr 16, 2024
a7db628
no_std works on Windows now
RalfJung Apr 16, 2024
7197990
Auto merge of #3477 - RalfJung:win-no-std, r=RalfJung
bors Apr 16, 2024
f325c8d
implement support for __rust_alloc_error_handler
RalfJung Apr 16, 2024
8ad72b2
Auto merge of #3478 - RalfJung:alloc_error_handler, r=RalfJung
bors Apr 16, 2024
40cfc2d
coverage: Move branch coverage tests into a subdirectory
Zalathar Apr 17, 2024
25b9f84
coverage: Branch coverage tests for lazy boolean operators
Zalathar Apr 17, 2024
af28716
Preparing for merge from rustc
Apr 17, 2024
e873988
Merge from rustc
Apr 17, 2024
2cb03ef
fmt
Apr 17, 2024
d10f613
alloc_error_handler tests: directly call handle_alloc_error; test mor…
RalfJung Apr 17, 2024
d7f79cc
tests/utils: add fmt::Write implementations for miri's native stdout/…
RalfJung Apr 17, 2024
9f156d3
no need to use miri's native stderr here
RalfJung Apr 17, 2024
14701ef
Auto merge of #3479 - rust-lang:rustup-2024-04-17, r=RalfJung
bors Apr 17, 2024
9776f64
Auto merge of #3480 - RalfJung:alloc_error_handler, r=RalfJung
bors Apr 17, 2024
4734163
Add llvm-bitcode-linker to build manifest
kjetilkjeka Apr 17, 2024
6a108a7
Preparing for merge from rustc
RalfJung Apr 17, 2024
3d3550f
Merge from rustc
RalfJung Apr 17, 2024
7c3c271
fmt
RalfJung Apr 17, 2024
d261b53
Auto merge of #3481 - RalfJung:rustup, r=RalfJung
bors Apr 17, 2024
fdf93bb
Improve std::fs::Metadata Debug representation
dtolnay Apr 18, 2024
5c352a4
add test for Drop terminator on non-drop type
RalfJung Apr 18, 2024
0f44382
Auto merge of #3483 - RalfJung:drop, r=RalfJung
bors Apr 18, 2024
62e84d5
move read_byte_slice to general helpers file, next to read_c_str
RalfJung Apr 18, 2024
5697f73
Auto merge of #3485 - RalfJung:read_byte_slice, r=RalfJung
bors Apr 18, 2024
5ef38ac
add test checking that we do run MIR validation
RalfJung Apr 18, 2024
5c9924a
Auto merge of #3486 - RalfJung:mir-validate, r=RalfJung
bors Apr 18, 2024
73e333a
make realloc with a size of zero fail
RalfJung Apr 18, 2024
5ff9b2b
move allocator shim logic into its own file
RalfJung Apr 18, 2024
1ce64e7
Auto merge of #3484 - RalfJung:realloc, r=RalfJung
bors Apr 18, 2024
48fd549
when an address gets reused, establish a happens-before link in the d…
RalfJung Apr 16, 2024
d7916fc
do not reuse stack addresses; make reuse rate configurable
RalfJung Apr 18, 2024
61def01
llvm RustWrapper: explain OpBundlesIndirect argument type
RalfJung Apr 18, 2024
5067dd2
comment clarification and typo fix
RalfJung Apr 18, 2024
39f0c4f
Auto merge of #3488 - RalfJung:os_str_comment, r=RalfJung
bors Apr 18, 2024
9b419a1
when reusing an address, most of the time only reuse from the current…
RalfJung Apr 18, 2024
c1cf0a3
Preparing for merge from rustc
Apr 19, 2024
d0783e8
Merge from rustc
Apr 19, 2024
b9ed4cd
share code between win-to-unix and unix-to-win path conversion
RalfJung Apr 19, 2024
134ee30
Auto merge of #3490 - RalfJung:paths, r=RalfJung
bors Apr 19, 2024
fecd7fc
make test not leak rustc crate hash
RalfJung Apr 19, 2024
95ae2dd
Auto merge of #3489 - rust-lang:rustup-2024-04-19, r=RalfJung
bors Apr 19, 2024
e9ebc6f
Auto merge of #3475 - RalfJung:reduce-reuse-recycle, r=RalfJung
bors Apr 19, 2024
29e41fb
Preparing for merge from rustc
Apr 20, 2024
b63bb1b
Merge from rustc
Apr 20, 2024
8e1f18d
fix clippy warning
RalfJung Apr 20, 2024
7952316
re-bless tests
RalfJung Apr 20, 2024
9713ff4
Auto merge of #3494 - rust-lang:rustup-2024-04-20, r=RalfJung
bors Apr 20, 2024
912c670
Move pretty-printer FixupContext to a module
dtolnay Apr 20, 2024
debdb72
Give a name to each distinct manipulation of pretty-printer FixupContext
dtolnay Apr 20, 2024
7dcfb54
data_race: make the release/acquire API more clear
RalfJung Apr 20, 2024
cb1b4a6
reuse_pool: only do acquire_clock if we reused from a different thread
RalfJung Apr 20, 2024
8cab0d5
restrict VClock API surface
RalfJung Apr 20, 2024
6b0ce8b
Auto merge of #3495 - RalfJung:data-race-clocks, r=RalfJung
bors Apr 20, 2024
61a7d3d
ensure the ICE-to-file logic does not affect our test
RalfJung Apr 20, 2024
75d0fdd
mir-opt tests: rename unit-test -> test-mir-pass
RalfJung Apr 20, 2024
be564a8
Print note with closure signature on type mismatch
wutchzone Apr 2, 2024
b15ad39
Rollup merge of #123379 - wutchzone:119266, r=compiler-errors
jieyouxu Apr 20, 2024
0362db7
Rollup merge of #123967 - RalfJung:static_mut_refs, r=Nilstrieb
jieyouxu Apr 20, 2024
f127723
Rollup merge of #123976 - ChrisDenton:no-libc-in-std-doc-tests, r=Mar…
jieyouxu Apr 20, 2024
6be1d23
Rollup merge of #123986 - ehuss:lint-renamed, r=Mark-Simulacrum
jieyouxu Apr 20, 2024
ea6199f
Rollup merge of #124053 - Zalathar:lazy-boolean, r=Mark-Simulacrum
jieyouxu Apr 20, 2024
58a1d7f
Rollup merge of #124071 - kjetilkjeka:llvm_bitcode_linker_build_manif…
jieyouxu Apr 20, 2024
0cafa4e
Rollup merge of #124103 - dtolnay:metadatadebug, r=Mark-Simulacrum
jieyouxu Apr 20, 2024
e5d49b1
Rollup merge of #124132 - RalfJung:OpBundlesIndirect, r=Mark-Simulacrum
jieyouxu Apr 20, 2024
e8e921f
Rollup merge of #124191 - dtolnay:fixup, r=compiler-errors
jieyouxu Apr 20, 2024
02b42b5
Rollup merge of #124193 - RalfJung:miri, r=RalfJung
jieyouxu Apr 20, 2024
9dfd633
Rollup merge of #124196 - RalfJung:mir-opt-tests, r=Mark-Simulacrum
jieyouxu Apr 20, 2024
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
25 changes: 6 additions & 19 deletions compiler/rustc_ast_pretty/src/pprust/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
//! Note that HIR pretty printing is layered on top of this crate.

mod expr;
mod fixup;
mod item;

use crate::pp::Breaks::{Consistent, Inconsistent};
use crate::pp::{self, Breaks};
use crate::pprust::state::expr::FixupContext;
use crate::pprust::state::fixup::FixupContext;
use ast::TraitBoundModifiers;
use rustc_ast::attr::AttrIdGenerator;
use rustc_ast::ptr::P;
use rustc_ast::token::{self, BinOpToken, CommentKind, Delimiter, Nonterminal, Token, TokenKind};
use rustc_ast::tokenstream::{Spacing, TokenStream, TokenTree};
use rustc_ast::util::classify;
use rustc_ast::util::comments::{Comment, CommentStyle};
use rustc_ast::util::parser;
use rustc_ast::{self as ast, AttrArgs, AttrArgsEq, BlockCheckMode, PatKind};
use rustc_ast::{attr, BindingMode, ByRef, DelimArgs, RangeEnd, RangeSyntax, Term};
use rustc_ast::{GenericArg, GenericBound, SelfKind};
Expand Down Expand Up @@ -1252,22 +1252,14 @@ impl<'a> State<'a> {
ast::StmtKind::Item(item) => self.print_item(item),
ast::StmtKind::Expr(expr) => {
self.space_if_not_bol();
self.print_expr_outer_attr_style(
expr,
false,
FixupContext { stmt: true, ..FixupContext::default() },
);
self.print_expr_outer_attr_style(expr, false, FixupContext::new_stmt());
if classify::expr_requires_semi_to_be_stmt(expr) {
self.word(";");
}
}
ast::StmtKind::Semi(expr) => {
self.space_if_not_bol();
self.print_expr_outer_attr_style(
expr,
false,
FixupContext { stmt: true, ..FixupContext::default() },
);
self.print_expr_outer_attr_style(expr, false, FixupContext::new_stmt());
self.word(";");
}
ast::StmtKind::Empty => {
Expand Down Expand Up @@ -1319,11 +1311,7 @@ impl<'a> State<'a> {
ast::StmtKind::Expr(expr) if i == blk.stmts.len() - 1 => {
self.maybe_print_comment(st.span.lo());
self.space_if_not_bol();
self.print_expr_outer_attr_style(
expr,
false,
FixupContext { stmt: true, ..FixupContext::default() },
);
self.print_expr_outer_attr_style(expr, false, FixupContext::new_stmt());
self.maybe_print_trailing_comment(expr.span, Some(blk.span.hi()));
}
_ => self.print_stmt(st),
Expand Down Expand Up @@ -1367,8 +1355,7 @@ impl<'a> State<'a> {
self.word_space("=");
self.print_expr_cond_paren(
expr,
fixup.parenthesize_exterior_struct_lit && parser::contains_exterior_struct_lit(expr)
|| parser::needs_par_as_let_scrutinee(expr.precedence().order()),
fixup.needs_par_as_let_scrutinee(expr),
FixupContext::default(),
);
}
Expand Down
Loading
Loading