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 #107451

Merged
merged 25 commits into from
Jan 29, 2023
Merged
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
fcbc12e
Implement `signum` with `Ord`
scottmcm Jan 13, 2023
66f60e5
Update wording of invalid_doc_attributes docs.
ehuss Jan 19, 2023
78db9ee
Pass `--locked` to the x test tidy call
albertlarsan68 Jan 21, 2023
2fe58b9
fix maintainer validation message
Abdur-rahmaanJ May 6, 2022
7713337
Print why a test was ignored if it's the only test specified.
lenko-d Jan 12, 2023
002dbbe
Print why a test was ignored if it's the only test specified.
lenko-d Jan 12, 2023
90e4c13
output tree representation for thir-tree
b-naber Jan 17, 2023
3bce66f
add test
b-naber Jan 17, 2023
9438126
previous thir unpretty output through thir-flat
b-naber Jan 26, 2023
92f2d27
address review
b-naber Jan 27, 2023
2cdec46
docs: remove colon from time header
notriddle Jan 28, 2023
74e843c
rustdoc: remove unused class `has-srclink`
notriddle Jan 28, 2023
807ebac
Insert whitespace to avoid ident concatenation in suggestion
lowr Jan 5, 2023
770d303
When stamp doesn't exist, should say Error, and print path to stamp file
Teapot4195 Jan 29, 2023
309fb19
Rollup merge of #96763 - Abdur-rahmaanJ:patch-1, r=Mark-Simulacrum
matthiaskrgr Jan 29, 2023
8691602
Rollup merge of #106540 - lowr:patch/remove-paren-whitespace, r=cjgillot
matthiaskrgr Jan 29, 2023
94809b3
Rollup merge of #106763 - lenko-d:106659-Print_why_a_test_was_ignored…
matthiaskrgr Jan 29, 2023
192eecd
Rollup merge of #106769 - lenko-d:libtest-print_why_a_test_was_ignore…
matthiaskrgr Jan 29, 2023
782da86
Rollup merge of #106798 - scottmcm:signum-via-cmp, r=Mark-Simulacrum
matthiaskrgr Jan 29, 2023
4544682
Rollup merge of #107006 - b-naber:thir-tree, r=jackh726
matthiaskrgr Jan 29, 2023
77e78e2
Rollup merge of #107078 - ehuss:invalid_doc_attributes-docs, r=jackh726
matthiaskrgr Jan 29, 2023
6ce862c
Rollup merge of #107169 - albertlarsan68:lock-in-pre-push, r=Mark-Sim…
matthiaskrgr Jan 29, 2023
3922654
Rollup merge of #107431 - notriddle:notriddle/colon, r=thomcc
matthiaskrgr Jan 29, 2023
dd315fd
Rollup merge of #107432 - notriddle:notriddle/has-srclink, r=Guillaum…
matthiaskrgr Jan 29, 2023
97e6aba
Rollup merge of #107448 - Teapot4195:pr-107397-followup, r=Mark-Simul…
matthiaskrgr Jan 29, 2023
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
15 changes: 15 additions & 0 deletions compiler/rustc_driver/src/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,21 @@ fn print_with_analysis(tcx: TyCtxt<'_>, ppm: PpMode) -> Result<(), ErrorGuarante
out
}

ThirFlat => {
let mut out = String::new();
abort_on_err(rustc_hir_analysis::check_crate(tcx), tcx.sess);
debug!("pretty printing THIR flat");
for did in tcx.hir().body_owners() {
let _ = writeln!(
out,
"{:?}:\n{}\n",
did,
tcx.thir_flat(ty::WithOptConstParam::unknown(did))
);
}
out
}

_ => unreachable!(),
};

Expand Down
12 changes: 9 additions & 3 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3531,9 +3531,15 @@ declare_lint! {
///
/// ### Explanation
///
/// Previously, there were very like checks being performed on `#[doc(..)]`
/// unlike the other attributes. It'll now catch all the issues that it
/// silently ignored previously.
/// Previously, incorrect usage of the `#[doc(..)]` attribute was not
/// being validated. Usually these should be rejected as a hard error,
/// but this lint was introduced to avoid breaking any existing
/// crates which included them.
///
/// This is a [future-incompatible] lint to transition this to a hard
/// error in the future. See [issue #82730] for more details.
///
/// [issue #82730]: https://github.com/rust-lang/rust/issues/82730
pub INVALID_DOC_ATTRIBUTES,
Warn,
"detects invalid `#[doc(...)]` attributes",
Expand Down
7 changes: 7 additions & 0 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ rustc_queries! {
desc { |tcx| "constructing THIR tree for `{}`", tcx.def_path_str(key.did.to_def_id()) }
}

/// Create a list-like THIR representation for debugging.
query thir_flat(key: ty::WithOptConstParam<LocalDefId>) -> String {
no_hash
arena_cache
desc { |tcx| "constructing flat THIR representation for `{}`", tcx.def_path_str(key.did.to_def_id()) }
}

/// Set of all the `DefId`s in this crate that have MIR associated with
/// them. This includes all the body owners, but also things like struct
/// constructors.
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/thir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use rustc_target::asm::InlineAsmRegOrRegClass;
use std::fmt;
use std::ops::Index;

pub mod print;
pub mod visit;

macro_rules! thir_with_elements {
Expand Down
Loading