about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-09-02Add higher docs and remove some unneeded fieldsCameron Steffen-49/+65
2021-09-02Fix remaining dogfood errorsflip1995-5/+3
Except for the missing docs ones
2021-09-02Fix dogfoodCameron Steffen-56/+41
2021-09-02Fix manual_match with let-expressionsCameron Steffen-211/+191
2021-09-02Merge remote-tracking branch 'upstream/master' into rustup2flip1995-603/+2552
2021-09-02expand: Treat more macro calls as statement macro callsVadim Petrochenkov-55/+108
2021-09-02Use in_incr_comp_dir_sess in cg_clifbjorn3-2/+1
2021-09-02Add explanation for ctfe_backtrace lockbjorn3-0/+3
2021-09-02Use in_incr_comp_dir_sess in cg_clifbjorn3-2/+1
2021-09-02Remove print_fuel_crate field of Sessionbjorn3-8/+3
2021-09-02Remove optimization_fuel_crate from Sessionbjorn3-6/+1
2021-09-02Auto merge of #88516 - matthiaskrgr:clippy_perf_end_august, ↵bors-10/+11
r=jyn514,GuillaumeGomez some low hanging clippy::perf fixes
2021-09-02Remove unused argument from resolve_cratebjorn3-9/+6
2021-09-02Introduce CrateRejections structbjorn3-40/+36
2021-09-02Remove root field from CrateLocatorbjorn3-9/+4
2021-09-02Remove host_hash from CrateLocatorbjorn3-7/+3
2021-09-02Refactor CrateLocator.is_proc_macrobjorn3-18/+13
This also fixes a (theoretical) bug where a proc-macro may be loaded as plugin if it exports a symbol with the right name.
2021-09-02Don't store Session in CrateLocatorbjorn3-11/+15
2021-09-02I/O safety for WinUWPbdbai-4/+5
2021-09-02Bless 32bit MIR opt testsMatthew Jasper-97/+72
2021-09-02Remove TODOMatthew Jasper-1/+0
2021-09-02Auto merge of #7619 - UnrealApex:patch-1, r=flip1995bors-4/+4
Update README.md Capitalized proper noun. changelog:none
2021-09-02Auto merge of #87114 - cjgillot:abilint, r=estebankbors-50/+61
Lint missing Abi in ast validation instead of lowering.
2021-09-02Implement #88581Jacob Pratt-0/+346
2021-09-01remove redundant / misplaced sentence from docsast-ral-4/+0
2021-09-01fix(test): update with `&mut` suggestionMichael Howell-2/+5
2021-09-02Auto merge of #83342 - Count-Count:win-console-incomplete-utf8, r=m-ou-sebors-15/+91
Allow writing of incomplete UTF-8 sequences to the Windows console via stdout/stderr # Problem Writes of just an incomplete UTF-8 byte sequence (e.g. `b"\xC3"` or `b"\xF0\x9F"`) to stdout/stderr with a Windows console attached error with `io::ErrorKind::InvalidData, "Windows stdio in console mode does not support writing non-UTF-8 byte sequences"` even though further writes could complete the codepoint. This is currently a rare occurence since the [linewritershim](https://github.com/rust-lang/rust/blob/2c56ea38b045624dc8b42ec948fc169eaff1206a/library/std/src/io/buffered/linewritershim.rs) implementation flushes complete lines immediately and buffers up to 1024 bytes for incomplete lines. It can still happen as described in #83258. The problem will become more pronounced once the developer can switch stdout/stderr from line-buffered to block-buffered or immediate when the changes in the "Switchable buffering for Stdout" pull request (#78515) get merged. # Patch description If there is at least one valid UTF-8 codepoint all valid UTF-8 is passed through to the extracted `write_valid_utf8_to_console()` fn. The new code only comes into play if `write()` is being passed a short byte slice comprising an incomplete UTF-8 codepoint. In this case up to three bytes are buffered in the `IncompleteUtf8` struct associated with `Stdout` / `Stderr`. The bytes are accepted one at a time. As soon as an error can be detected `io::ErrorKind::InvalidData, "Windows stdio in console mode does not support writing non-UTF-8 byte sequences"` is returned. Once a complete UTF-8 codepoint is received it is passed to the `write_valid_utf8_to_console()` and the buffer length is set to zero. Calling `flush()` will neither error nor write anything if an incomplete codepoint is present in the buffer. # Tests Currently there are no Windows-specific tests for console writing code at all. Writing (regression) tests for this problem is a bit challenging since unit tests and UI tests don't run in a console and suddenly popping up another console window might be surprising to developers running the testsuite and it might not work at all in CI builds. To just test the new functionality in unit tests the code would need to be refactored. Some guidance on how to proceed would be appreciated. # Public API changes * `std::str::verifications::utf8_char_width()` would be exposed as `std::str::utf8_char_width()` behind the "str_internals" feature gate. # Related issues * Fixes #83258. * PR #78515 will exacerbate the problem. # Open questions * Add tests? * Squash into one commit with better commit message?
2021-09-01Ensure suggestion is in its own diagnostic windowNoah Lev-46/+68
For two reasons: 1. Now that the suggestion span has been corrected, the output is a bit cluttered and hard to read. Putting the suggestion its own window creates more space. 2. It's easier to see what's being suggested, since now the version after the suggestion is applied is shown.
2021-09-01Fix span used for structured tuple struct suggestionNoah Lev-10/+135
(And same for tuple variants.) Previously, the span was just for the constructor name, which meant it would result in syntactically-invalid code when applied. Now, the span is for the entire expression.
2021-09-01fix(rustc): suggest `items` be borrowed in `for i in items[x..]`Michael Howell-4/+57
Fixes #87994
2021-09-02Auto merge of #7617 - xFrednet:0000-link-diag-item-docs, r=giraffatebors-0/+1
Reference new diagnostic item docs in our docs :) The title says it all. The rustc dev guide now has some information about diagnostic items that are worthwhile linking to :upside_down_face: --- changelog: none
2021-09-02Auto merge of #88522 - camelid:box-paren-output, r=jyn514bors-9/+18
rustdoc: Box `GenericArgs::Parenthesized.output` Split out from #88379. This reduces the size of `GenericArgs` from 104 bytes to 56 bytes, essentially reducing it by half. `GenericArgs` is one of the fields of `PathSegment`, so this should reduce the amount of memory allocated for `PathSegment`s in the cases where the generics are not for a `Fn`, `FnMut`, or `FnOnce` trait. r? `@jyn514`
2021-09-01Fix drop handling for `if let` expressionsMatthew Jasper-464/+524
MIR lowering for `if let` expressions is now more complicated now that `if let` exists in HIR. This PR adds a scope for the variables bound in an `if let` expression and then uses an approach similar to how we handle loops to ensure that we reliably drop the correct variables.
2021-09-02ty::layout: split `LayoutOf` into required and (blanket) provided halves.Eduard-Mihai Burtescu-3/+3
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-13/+13
2021-09-02ty::layout: split `LayoutOf` into required and (blanket) provided halves.Eduard-Mihai Burtescu-19/+25
2021-09-02ty::layout: implement `layout_of` automatically as a default method.Eduard-Mihai Burtescu-11/+11
2021-09-02ty::layout: implement `layout_of` automatically as a default method.Eduard-Mihai Burtescu-54/+105
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-6/+4
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-170/+148
2021-09-01rustdoc: Don't panic on ambiguous inherent associated typesNoah Lev-4/+38
Instead, return `Type::Infer` since compilation should fail anyway. That's how rustdoc handles `hir::TyKind::Err`s, so this just extends that behavior to `ty::Err`s when analyzing associated types. For some reason, the error is printed twice with rustdoc (though only once with rustc). I'm not sure why that is, but it's better than panicking. This commit also makes rustdoc fail early in the non-projection, non-error case, instead of returning a `Res::Err` that would likely cause rustdoc to panic later on. This change is originally from #88379.
2021-09-01Auto merge of #88490 - GuillaumeGomez:associated-types-implementors-display, ↵bors-50/+112
r=camelid,Manishearth Display associated types of implementors Fixes #86631. Contrary to before, it doesn't display methods. I also had to "resurrect" the `auto-hide-trait-implementations` setting. :3 Only question at this point: should I move the `render_impl` boolean arguments into one struct? We're starting to have quite a lot of them... cc `@cynecx` r? `@camelid`
2021-09-01Update README.mdAaron-4/+4
2021-09-01Reference new diagnostic item docs in our docs :)xFrednet-0/+1
2021-09-01Remove implementors settingGuillaume Gomez-16/+1
2021-09-01Compute proc_macros in resolutions.Camille GILLOT-54/+52
2021-09-01Compute all_traits_impls during resolution.Camille GILLOT-18/+17
2021-09-01Compute item_generics_num_lifetimes during resolution.Camille GILLOT-54/+30
2021-09-01Stop sorting bodies by span.Camille GILLOT-151/+130
The definition order is already close to the span order, and only differs in corner cases.
2021-09-01Remove redundant `Span` in `QueryJobInfo`Noah Lev-11/+8
Previously, `QueryJobInfo` was composed of two parts: a `QueryInfo` and a `QueryJob`. However, both `QueryInfo` and `QueryJob` have a `span` field, which seem to be the same. So, the `span` was recorded twice. Now, `QueryJobInfo` is composed of a `QueryStackFrame` (the other field of `QueryInfo`) and a `QueryJob`. So, now, the `span` is only recorded once.