Skip to content

Rustup #9881

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

Merged
merged 54 commits into from
Nov 21, 2022
Merged

Rustup #9881

Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
506bfc2
Auto merge of #2583 - RalfJung:rustup, r=oli-obk
bors Oct 8, 2022
9ffc54d
merge rustc history
RalfJung Oct 9, 2022
93cc616
merge rustc history
RalfJung Oct 10, 2022
928606a
merge rustc history
RalfJung Oct 12, 2022
831b994
Implement -Ztrack-diagnostics
Oct 18, 2022
b78509e
Add testcase for next_point, fix more trivial issues in find_width_of…
chenyukang Oct 19, 2022
4dfc7b2
Fixup a few tests needing asm support
cuviper Oct 19, 2022
5650673
Implement assertions and fixes to not emit empty spans without sugges…
kper Oct 11, 2022
059e52b
rustc_hir_typeck: fix clippy
lcnr Oct 20, 2022
9fe8e3d
merge rustc history
RalfJung Oct 21, 2022
d397819
Rollup merge of #102922 - kper:bugfix/102902-filtering-json, r=oli-obk
Dylan-DPC Oct 21, 2022
0569f56
Rollup merge of #103260 - cuviper:needs-asm-support, r=fee1-dead
Dylan-DPC Oct 21, 2022
46cf1ea
Auto merge of #103344 - Dylan-DPC:rollup-d1rpfvx, r=Dylan-DPC
bors Oct 21, 2022
2ed4049
Introduce subst_iter and subst_iter_copied on EarlyBinder
compiler-errors Oct 16, 2022
cd0bb7d
Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup
flip1995 Oct 23, 2022
beae0d2
Address some comments
Oct 24, 2022
48edc83
Add more normalization and tests
Oct 24, 2022
5b336fd
Auto merge of #103392 - RalfJung:miri, r=oli-obk
bors Oct 25, 2022
4b1cebb
Adjust normalization
Oct 26, 2022
45c000b
privacy: Rename "accessibility levels" to "effective visibilities"
petrochenkov Sep 22, 2022
471d855
Update tooling
WaffleLapkin Oct 27, 2022
6e6a803
Move clippy::uninlined_format_args back to pedantic
flip1995 Oct 27, 2022
678e675
Retain ParamEnv constness when running deferred cast checks
fee1-dead Oct 28, 2022
26eeeee
Auto merge of #102233 - petrochenkov:effvis, r=jackh726
bors Oct 29, 2022
efca32e
Rename some `OwnerId` fields.
nnethercote Oct 27, 2022
dff041f
Rollup merge of #103625 - WaffleLapkin:no_tyctxt_dogs_allowed, r=comp…
GuillaumeGomez Oct 29, 2022
16566e9
Use LanguageItems::require less
camsteffen Oct 26, 2022
9f2852f
Auto merge of #103217 - mejrs:track, r=eholk
bors Nov 1, 2022
188e8e9
improve `filesearch::get_or_default_sysroot` r=ozkanonur
onur-ozkan Oct 28, 2022
40dca3d
Rollup merge of #103660 - ozkanonur:master, r=jyn514
Dylan-DPC Nov 5, 2022
84c3a95
bless clippy
chenyukang Nov 9, 2022
7ddd321
Introduce `ExprKind::IncludedBytes`
clubby789 Oct 31, 2022
e6ef478
Store a LocalDefId in hir::Variant & hir::Field.
cjgillot Nov 6, 2022
8a2d0f2
Fix clippy and rustdoc
WaffleLapkin Nov 13, 2022
f2d83ed
Use `token::Lit` in `ast::ExprKind::Lit`.
nnethercote Oct 10, 2022
2bf87f3
cleanup and dedupe CTFE and Miri error reporting
RalfJung Nov 15, 2022
e5352c7
Convert predicates into Predicate in the Obligation constructor
oli-obk Nov 9, 2022
cbd6159
Auto merge of #102944 - nnethercote:ast-Lit-third-time-lucky, r=petro…
bors Nov 16, 2022
333b92c
Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, typ…
nnethercote Sep 8, 2022
11d632f
Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-dead
bors Nov 17, 2022
82afb16
Add variant_name function to `LangItem`
flip1995 Nov 5, 2022
f7535e7
Rollup merge of #104483 - oli-obk:santa-clauses-make-goals, r=compile…
matthiaskrgr Nov 17, 2022
a09423f
Rm diagnostic item, use lang item
fee1-dead Jul 5, 2022
8749eda
Rollup merge of #104006 - flip1995:lang-items-clippy, r=oli-obk
matthiaskrgr Nov 18, 2022
bc01b2e
Auto merge of #101562 - nnethercote:shrink-ast-Expr-harder, r=petroch…
bors Nov 18, 2022
f6d4ef9
Auto merge of #104573 - matthiaskrgr:rollup-k36ybtp, r=matthiaskrgr
bors Nov 18, 2022
3a2eaa7
drive-by: Add is_async fn to hir::IsAsync
compiler-errors Nov 19, 2022
27c4c17
Rollup merge of #104593 - compiler-errors:rpitit-object-safety-spans,…
matthiaskrgr Nov 19, 2022
80a4699
Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compil…
bors Nov 20, 2022
fd5b85c
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Nov 21, 2022
25e98bf
Bump Clippy version -> 0.1.67
flip1995 Nov 21, 2022
661f13c
Bump nightly version -> 2022-11-21
flip1995 Nov 21, 2022
5907e91
pass clippy sysroot env if given r=ozkanonur
onur-ozkan Nov 19, 2022
05b914a
Fix custom ICE message test on windows
flip1995 Nov 21, 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
18 changes: 15 additions & 3 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,24 @@ pub fn main() {
exit(rustc_driver::catch_with_exit_code(move || {
let mut orig_args: Vec<String> = env::args().collect();

let sys_root_env = std::env::var("SYSROOT").ok();
let pass_sysroot_env_if_given = |args: &mut Vec<String>, sys_root_env| {
if let Some(sys_root) = sys_root_env {
args.extend(vec!["--sysroot".into(), sys_root]);
};
};
Comment on lines +255 to +260
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no longer avoids passing --sysroot twice if it's already present in the arguments (i.e. have_sys_root_arg is missing). @flip1995 @ozkanonur Is that intentional? It's making rust-lang/rust#97443 a little tricky to fix.

(I am not sure this is the actual PR where the change was made, it's been pretty hard to track down through the subtree updates.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is implemented intentionally to fix rust-lang/rust#103660 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems we need to check if --sysroot presents before this process. Do you want me to fix it ? @jyn514

Copy link
Member Author

@flip1995 flip1995 Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ozkanonur The fix is already implemented in #10149 . It's just waiting for my review. (This'll be merged before the sync on Thursday)

Thanks for offering your help!


// make "clippy-driver --rustc" work like a subcommand that passes further args to "rustc"
// for example `clippy-driver --rustc --version` will print the rustc version that clippy-driver
// uses
if let Some(pos) = orig_args.iter().position(|arg| arg == "--rustc") {
orig_args.remove(pos);
orig_args[0] = "rustc".to_string();

return rustc_driver::RunCompiler::new(&orig_args, &mut DefaultCallbacks).run();
let mut args: Vec<String> = orig_args.clone();
pass_sysroot_env_if_given(&mut args, sys_root_env);

return rustc_driver::RunCompiler::new(&args, &mut DefaultCallbacks).run();
}

if orig_args.iter().any(|a| a == "--version" || a == "-V") {
Expand All @@ -282,6 +292,9 @@ pub fn main() {
exit(0);
}

let mut args: Vec<String> = orig_args.clone();
pass_sysroot_env_if_given(&mut args, sys_root_env);

let mut no_deps = false;
let clippy_args_var = env::var("CLIPPY_ARGS").ok();
let clippy_args = clippy_args_var
Expand Down Expand Up @@ -310,11 +323,10 @@ pub fn main() {

let clippy_enabled = !cap_lints_allow && (!no_deps || in_primary_package);
if clippy_enabled {
let mut args: Vec<String> = orig_args.clone();
args.extend(clippy_args);
rustc_driver::RunCompiler::new(&args, &mut ClippyCallbacks { clippy_args_var }).run()
} else {
rustc_driver::RunCompiler::new(&orig_args, &mut RustcCallbacks { clippy_args_var }).run()
rustc_driver::RunCompiler::new(&args, &mut RustcCallbacks { clippy_args_var }).run()
}
}))
}