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

Sync rustfmt subtree #95458

Merged
merged 75 commits into from
Mar 30, 2022
Merged
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
6db6baf
Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rus…
calebcartwright Dec 30, 2021
737e6f7
Improve out of line module resolution
ytmimi Dec 20, 2021
93b7de5
Make `--check` work when running from stdin. (#3896)
jugglerchris Nov 6, 2019
34263cd
Fix --check -l with stdin. (#3910)
jugglerchris Nov 12, 2019
776baf9
refactor: update json emitter to better handle errors (#3953)
calebcartwright Dec 9, 2019
894a3c0
Fix newlines in JSON output (#4262)
Timmmm Jun 23, 2020
34d374e
Use <stdin> when emitting stdin as filename (#4298)
topecongiro Jul 3, 2020
5056f4c
some minor clippy fixes
matthiaskrgr Jan 5, 2022
6e63002
Compute most of Public/Exported access level in rustc_resolve
lambinoo Jul 26, 2021
04670a1
Remove LLVM-style inline assembly from rustfmt
tmiasko Jan 12, 2022
bfbf42c
fix(rustfmt): resolve generated file formatting issue
calebcartwright Jan 15, 2022
8ae2312
Auto merge of #92816 - tmiasko:rm-llvm-asm, r=Amanieu
bors Jan 17, 2022
f5ce84e
add eq constraints on associated constants
JulianKnodt Jul 30, 2021
cf86d53
Add term
JulianKnodt Jan 7, 2022
7913f13
Add term to ExistentialProjection
JulianKnodt Jan 13, 2022
9b454a5
Merge remote-tracking branch 'upstream/master' into subtree-sync-2022…
calebcartwright Jan 23, 2022
9e1973f
chore: bump toolchain, update test
calebcartwright Jan 23, 2022
5c558e2
Merge pull request #5186 from calebcartwright/subtree-sync-2022-01-23
calebcartwright Jan 23, 2022
3572c54
rustc_errors: only box the `diagnostic` field in `DiagnosticBuilder`.
eddyb Jan 24, 2022
b4a4bf0
Fix formatting of comments in empty structs (#5171)
Szymongib Jan 29, 2022
8b0b213
Prevent adding trailing whitespace when rewriting ast::Param
ytmimi Dec 10, 2021
368a9b7
Handle non-ascii character at boundary (#5089)
scampi Feb 2, 2022
606894e
Retain trailing separator when extracting the last inline post comment
ytmimi Dec 19, 2021
b2c7a52
Fix import_granularity option when the use tree has an alias
scampi Jan 31, 2022
fd6e11c
Add tests for the One and Crate variants
scampi Feb 2, 2022
5df8c8f
Fix doc of generic items formmating error (#5124)
frank-king Feb 7, 2022
ace7241
Fix incorrect string indentation in macro defs with `format_strings`
yodaldevoid Jan 29, 2022
813d127
Clarify generated marker requires a config option
stepancheg Feb 7, 2022
b05b313
chore(rustfmt): remove executable path from usage string (#5216)
tharun208 Feb 11, 2022
1e78a2b
Leverage itemized blocks to support formatting markdown block quotes
ytmimi Dec 30, 2021
6c47612
Add context to get_toml_path() error (#5207)
tmfink Feb 15, 2022
d5aabcc
Format code
camsteffen Feb 1, 2022
c63d42e
Use cargo-fmt in self_tests
camsteffen Feb 1, 2022
281bf03
fix: formatting in new test
calebcartwright Feb 16, 2022
7592663
rustc_errors: add `downgrade_to_delayed_bug` to `Diagnostic` itself.
eddyb Jan 23, 2022
5723946
rustc_errors: take `self` by value in `DiagnosticBuilder::cancel`.
eddyb Jan 26, 2022
89ca3f3
fix: unused test imports on non-nightly, prevent regression
calebcartwright Feb 24, 2022
de1ac37
Enable rustc_pass_by_value for Span
Mark-Simulacrum Feb 23, 2022
12048e4
fallback to dir_path when relative external mod resolution fails
ytmimi Jan 30, 2022
272fb42
Prevent wrapping markdown headers in doc comments
ytmimi Feb 25, 2022
4edb757
refactor: prepare to associate multiple spans with a module.
pnkfelix Jan 20, 2022
74876ef
Associate multiple with a crate too.
pnkfelix Mar 3, 2022
651f463
Adjusted diagnostic output so that if there is no `use` in a item seq…
pnkfelix Jan 20, 2022
0be8931
Update `itertools`
pierwill Mar 4, 2022
ce301d9
Placate tidy in submodule.
pnkfelix Mar 4, 2022
1212c94
Change syntax for TyAlias where clauses
jackh726 Oct 19, 2021
6a2dae6
Rollup merge of #94617 - pierwill:update-itertools, r=Mark-Simulacrum
matthiaskrgr Mar 6, 2022
ee13051
Fix missing struct field separators under certain conditions
cassaundra Dec 29, 2021
ab9f2a8
Add more tests for struct_field_align_threshold and trailing_comma
cassaundra Jan 15, 2022
58de414
Add test for issue #4791
cassaundra Mar 5, 2022
003eaf8
placate rustfmt in rustfmt.
pnkfelix Mar 7, 2022
18c0369
Improve mod resolution error for mods with multiple candidate files
ytmimi Jan 11, 2022
b4de150
fix: imports_granularity module with path containing self
tommilligan Mar 4, 2022
a918d8b
Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber
bors Mar 15, 2022
9c65db6
Correct tracking issue link for `skip_children`
ytmimi Mar 12, 2022
5696e38
Add test to verify tracking issue links
ytmimi Mar 12, 2022
1bb85bd
chore: add utility function for relative span positions
calebcartwright Mar 10, 2022
c0861d3
resolve the conflict in compiler/rustc_session/src/parse.rs
codehorseman Mar 16, 2022
c1d351f
rustc_error: make ErrorReported impossible to construct
mark-i-m Jan 23, 2022
c801367
Merge remote-tracking branch 'upstream/master' into subtree-sync-2022…
calebcartwright Mar 17, 2022
cce0d50
Rollup merge of #94960 - codehorseman:master, r=oli-obk
Dylan-DPC Mar 17, 2022
432b8de
chore: bump toolchain
calebcartwright Mar 17, 2022
a36dc36
Merge pull request #5268 from calebcartwright/subtree-sync-2022-03-16
calebcartwright Mar 18, 2022
4f89c51
Take &mut Diagnostic in emit_diagnostic.
cjgillot Mar 20, 2022
e41329c
Search for struct body span after any generic arguments
ytmimi Mar 20, 2022
0dba01a
Add `short_item_threshold` config option
123vivekr Feb 13, 2022
8984438
Honor `#[rustfmt::skip::attributes(derive)]` attribute
ytmimi Mar 18, 2022
5731f1d
Merge remote-tracking branch 'upstream/master' into subtree-sync-2022…
calebcartwright Mar 28, 2022
c2039d9
chore: bump toolchain
calebcartwright Mar 28, 2022
63acf90
Merge pull request #5276 from calebcartwright/subtree-sync-2022-03-27
calebcartwright Mar 28, 2022
4fecede
Revert "Use cargo-fmt in self_tests"
calebcartwright Mar 29, 2022
e0c7b7d
tests: ignore cargo fmt test for rust-lang/rust runs
calebcartwright Mar 29, 2022
8e94761
Add test of macro calls inside extern block
dtolnay Mar 29, 2022
5ff7b63
Preserve semicolon after macro call inside foreign mod
dtolnay Mar 29, 2022
419df99
Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rus…
calebcartwright Mar 30, 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
Prev Previous commit
Next Next commit
Add context to get_toml_path() error (#5207)
* rustfmt: print full error chain

* Add context to get_toml_path() error

Instead of an error like:

```
Permission denied (os error 13)
```

Gives error like:

```
Failed to get metadata for config file "/root/.rustfmt.toml": Permission denied (os error 13)
```
tmfink authored Feb 15, 2022
commit 6c476127aedc37b43769469f87e0fbc382382739
2 changes: 1 addition & 1 deletion src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ fn main() {
let exit_code = match execute(&opts) {
Ok(code) => code,
Err(e) => {
eprintln!("{}", e);
eprintln!("{:#}", e);
1
}
};
4 changes: 3 additions & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
@@ -364,7 +364,9 @@ fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
// find the project file yet, and continue searching.
Err(e) => {
if e.kind() != ErrorKind::NotFound {
return Err(e);
let ctx = format!("Failed to get metadata for config file {:?}", &config_file);
let err = anyhow::Error::new(e).context(ctx);
return Err(Error::new(ErrorKind::Other, err));
}
}
_ => {}