about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-10-09remove ReadDir.end_of_stream on targets that don't use itJosh Stone-1/+18
2020-10-09unix/vxworks: make DirEntry slightly smallerJosh Stone-10/+8
`DirEntry` contains a `ReadDir` handle, which used to just be a wrapper on `Arc<InnerReadDir>`. Commit af75314ecdbc5 added `end_of_stream: bool` which is not needed by `DirEntry`, but adds 8 bytes after padding. We can let `DirEntry` have an `Arc<InnerReadDir>` directly to avoid that.
2020-10-09Auto merge of #77690 - est31:llvm_8_required, r=matthewjasperbors-6/+3
Simplify some code in rustc_llvm/build.rs now that LLVM 8 is required LLVM 8 is required since 8506bb006040cf8e8cb004202706c81e62ddacee so this is safe to do.
2020-10-09Auto merge of #77698 - vandenheuvel:chalkup, r=jackh726bors-12/+12
Update chalk to 0.32.0 r? `@jackh726`
2020-10-09Auto merge of #77687 - est31:hash_shorter_path, r=davidtwcobors-6/+6
Use shorter path for std::hash::Hash
2020-10-09Auto merge of #77627 - richkadel:rust-demangler, r=tmandrybors-4/+62
rust-demangler tool strips crate disambiguators with < 16 digits Addresses Issue #77615.
2020-10-09Auto merge of #77578 - euclio:max-suggestion, r=davidtwcobors-1/+70
suggest `MAX` constant if -1 is assigned to unsigned type Fixes #76413. Fixes #77416.
2020-10-09Auto merge of #77519 - jyn514:track-doc-er, r=GuillaumeGomezbors-112/+235
Resolve intra-doc links on additional documentation for re-exports in lexical scope Fixes https://github.com/rust-lang/rust/issues/77254. - Preserve the parent module of `DocFragment`s + Add `parent_module` to `DocFragment` + Require the `parent_module` of the item being inlined + Preserve the hir_id for ExternCrates so rustdoc can find the parent module later + Take an optional `parent_module` for `build_impl` and `merge_attrs`. Preserve the difference between parent modules for each doc-comment. + Support a single additional re-exports in from_ast. Originally this took a vec but I ended up not using it. + Don't require the parent_module for all `impl`s, just inlined items In particular, this will be `None` whenever the attribute is not on a re-export. + Only store the parent_module, not the HirId When re-exporting a re-export, the HirId is not available. Fortunately, `collect_intra_doc_links` doesn't actually need all the info from a HirId, just the parent module. - Introduce `Divider` This distinguishes between documentation on the original from docs on the re-export. - Use the new module information for intra-doc links + Make the parent module conditional on whether the docs are on a re-export + Make `resolve_link` take `&Item` instead of `&mut Item` Previously the borrow checker gave an error about multiple mutable borrows, because `dox` borrowed from `item`. + Fix `crate::` for re-exports `crate` means something different depending on where the attribute came from. + Make it work for `#[doc]` attributes too This required combining several attributes as one so they would keep the links. r? `@GuillaumeGomez`
2020-10-09Auto merge of #76260 - xd009642:rfc/2867, r=jonas-schievinkbors-4/+247
Implementation of RFC2867 https://github.com/rust-lang/rust/issues/74727 So I've started work on this, I think my next steps are to make use of the `instruction_set` value in the llvm codegen but this is the point where I begin to get a bit lost. I'm looking at the code but it would be nice to have some guidance on what I've currently done and what I'm doing next :smile:
2020-10-08Fix typo in error codexd009642-1/+1
2020-10-08Auto merge of #77723 - jonas-schievink:rollup-htz44r4, r=jonas-schievinkbors-14/+36
Rollup of 8 pull requests Successful merges: - #76750 (Don't discourage implementing `core::fmt::Write`) - #77449 (BTreeMap: comment why drain_filter's size_hint is somewhat pessimistic) - #77660 ((docs): make mutex error comment consistent with codebase) - #77663 (Add compile fail test for issue 27675) - #77673 (Remove unnecessary lamda on emitter map.) - #77701 (Make `max_log_info` easily greppable (for figuring out why debug logging is disabled)) - #77702 (Remove not needed lambda.) - #77710 (Update submodule llvm to get LVI bugfix) Failed merges: r? `@ghost`
2020-10-08Implement the instruction_set attributexd009642-4/+247
2020-10-08Rollup merge of #77710 - fortanix:raoul/bugfix-lvi, r=nikicJonas Schievink-0/+0
Update submodule llvm to get LVI bugfix The LLVM LVI mitigations used register %rcs as a clobber register. This is problematic when rust uses this register to return (part of) function values. The problem was fixed upstream in: https://reviews.llvm.org/D88924 https://reviews.llvm.org/D88925 PR https://github.com/rust-lang/llvm-project/pull/79 merged it in the llvm_project. This PR updates the submodule Bug report: https://bugs.llvm.org/show_bug.cgi?id=47740 Fixes #77607 cc: @jethrogb
2020-10-08Rollup merge of #77702 - heckad:patch-3, r=lcnrJonas Schievink-1/+1
Remove not needed lambda.
2020-10-08Rollup merge of #77701 - jyn514:debug-logging, r=Mark-SimulacrumJonas Schievink-0/+4
Make `max_log_info` easily greppable (for figuring out why debug logging is disabled) Follow-up to https://github.com/rust-lang/rust/pull/77678#issuecomment-705545608. I'll make a PR to the dev-guide shortly changing `debug = true` to `debug-logging = true` and using this text. Ideally wouldn't be merged before https://github.com/rust-lang/rust/pull/77678, but it practice it won't hurt anything. r? @Mark-Simulacrum
2020-10-08Rollup merge of #77673 - heckad:patch-2, r=lcnrJonas Schievink-2/+1
Remove unnecessary lamda on emitter map.
2020-10-08Rollup merge of #77663 - HeroicKatora:regression-tests-27675-object-safe, ↵Jonas Schievink-0/+19
r=Aaron1011 Add compile fail test for issue 27675 A recently merged PR (#73905) strengthened the checks on bounds of associated items. This rejects the attack path of #27675 which consisted of constructing a `dyn Trait<Item=T>` where `T` would not fulfill the bounds required on `Item` of the `Trait` behind the dyn object. This regression test, extracted from [the weaponized instance](https://github.com/rust-lang/rust/issues/27675#issuecomment-696956878), checks that this is rejected.
2020-10-08Rollup merge of #77660 - nilslice:patch-1, r=jyn514Jonas Schievink-1/+1
(docs): make mutex error comment consistent with codebase Although exceptionally minor, I found this stands out from other error reporting language used in doc comments. With the existence of the `failure` crate, I suppose this could be slightly ambiguous. In any case, this change brings the particular comment into a consistent state with other mentions of returning errors.
2020-10-08Rollup merge of #77449 - ssomers:btree_drain_filter_size_hint, r=Mark-SimulacrumJonas Schievink-0/+4
BTreeMap: comment why drain_filter's size_hint is somewhat pessimistic The `size_hint` of the `DrainFilter` iterator doesn't adjust as you iterate. This hardly seems important to me, but there has been a comparable PR #64383 in the past. I guess a scenario is that you first iterate half the map manually and keep most of the key/value pairs in the map, and then tell the predicate to drain most of the key/value pairs and `.collect` the iterator over the remaining half of the map. I am totally ambivalent whether this is better or not. r? @Mark-Simulacrum
2020-10-08Rollup merge of #76750 - camelid:dont-discourage-core-fmt-write, ↵Jonas Schievink-10/+6
r=Mark-Simulacrum Don't discourage implementing `core::fmt::Write` Fixes #76729. Explain when you should use it and when you should not.
2020-10-08Auto merge of #77110 - lzutao:e0596-amp_mut, r=davidtwcobors-46/+60
Suggest removing `&mut` from a `&mut borrow` Modify the code added in #54720. Closes #75871
2020-10-08rust-demangler tool strips crate disambiguators with < 16 digitsRich Kadel-4/+62
Addresses Issue #77615.
2020-10-08Don't discourage implementing `core::fmt::Write`Camelid-10/+6
Explain when you should use it and when you should not.
2020-10-08Auto merge of #77346 - Caduser2020:master, r=Mark-Simulacrumbors-119/+170
`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgx This is part of #73904. Enclose unsafe operations in unsafe blocks in `libstd/sys/sgx`.
2020-10-08suggest `MAX` constant if -1 is assigned to unsigned typeAndy Russell-1/+70
2020-10-08Update submodule llvm to get LVI bugfixRaoul Strackx-0/+0
2020-10-08`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgxCaduser2020-119/+170
Run `./x.py` fmt Add reference link Fix reference link Apply review suggestions.
2020-10-08Suggest removing &mut from borrow of &mutLzu Tao-46/+60
Fix a typo: minding -> binding Add test for &mut &mut
2020-10-08Auto merge of #77678 - jyn514:tracing, r=Mark-Simulacrumbors-12/+6
Upgrade to tracing-subscriber 0.2.13 The primary motivation is to get the changes from https://github.com/tokio-rs/tracing/pull/990. Example output: ``` $ RUSTDOC_LOG=debug rustdoc +rustc2 warning: some trace filter directives would enable traces that are disabled statically | `debug` would enable the DEBUG level for all targets = note: the static max level is `info` = help: to enable DEBUG logging, remove the `max_level_info` feature ``` r? `@Mark-Simulacrum` cc `@hawkw` ❤️
2020-10-08Remove not needed lambda.Kazantcev Andrey-1/+1
2020-10-08Make `max_log_info` easily greppableJoshua Nelson-0/+4
2020-10-08Auto merge of #77581 - ecstatic-morse:dataflow-dump-mir-graphviz, r=davidtwcobors-24/+24
Use `pretty::create_dump_file` for dumping dataflow results The old code wasn't incorporating promoteds into the path, meaning other `dot` files could get clobbered. Use the MIR dump infrastructure to generate paths so that this doesn't occur in the future.
2020-10-08Update chalk to 0.32.0Bram van den Heuvel-12/+12
2020-10-08Commit suggestionKazantcev Andrey-1/+1
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-10-08Auto merge of #77682 - Mark-Simulacrum:bump-stage0, r=pietroalbinibors-17/+10
Bump to 1.48 bootstrap compiler r? `@pietroalbini` (but anyone can feel free to review)
2020-10-08Auto merge of #77644 - GuillaumeGomez:fix-tooltip-text-display, r=jyn514bors-0/+4
Fix tooltip text display Currently, when we hover the icon, the text doesn't show up: ![Screenshot from 2020-10-07 11-30-44](https://user-images.githubusercontent.com/3050060/95313768-cc402200-0890-11eb-95a4-a1ae8e38aee1.png) The bug was spotted by `@Nemo157` r? `@jyn514`
2020-10-08Add compile fail test for issue 27675Andreas Molzer-0/+19
2020-10-08Auto merge of #77631 - jyn514:helpful-changelog, r=RalfJungbors-3/+3
Make src/bootstrap/CHANGELOG.md more helpful Addresses https://github.com/rust-lang/rust/commit/fe6fc555acd51bd7ba8755d9fbc7060feb67be25#r42949241. r? `@RalfJung` cc `@Mark-Simulacrum`
2020-10-08Use the new module information for intra-doc linksJoshua Nelson-44/+84
- Make the parent module conditional on whether the docs are on a re-export - Make `resolve_link` take `&Item` instead of `&mut Item` Previously the borrow checker gave an error about multiple mutable borrows, because `dox` borrowed from `item`. - Fix `crate::` for re-exports `crate` means something different depending on where the attribute came from. - Make it work for `#[doc]` attributes too This required combining several attributes as one so they would keep the links.
2020-10-08Introduce `Divider`Joshua Nelson-53/+75
This distinguishes between documentation on the original from docs on the re-export
2020-10-08Preserve the parent module of `DocFragment`sJoshua Nelson-40/+101
- Add `parent_module` to `DocFragment` - Require the `parent_module` of the item being inlined - Preserve the hir_id for ExternCrates so rustdoc can find the parent module later - Take an optional `parent_module` for `build_impl` and `merge_attrs`. Preserve the difference between parent modules for each doc-comment. - Support arbitrarily many re-exports in from_ast. In retrospect this is probably not used and could be simplified to a single `Option<(Attrs, DefId)>`. - Don't require the parent_module for all `impl`s, just inlined items In particular, this will be `None` whenever the attribute is not on a re-export. - Only store the parent_module, not the HirId When re-exporting a re-export, the HirId is not available. Fortunately, `collect_intra_doc_links` doesn't actually need all the info from a HirId, just the parent module.
2020-10-08Simplify some code in rustc_llvm/build.rs now that LLVM 8 is requiredest31-6/+3
LLVM 8 is required since 8506bb006040cf8e8cb004202706c81e62ddacee so this is safe to do.
2020-10-08Auto merge of #77683 - jyn514:git-hook, r=Mark-Simulacrumbors-4/+6
Unset GIT_DIR in pre-commit hook Works around https://github.com/rust-lang/rust/issues/77620. This won't help any other hooks you write manually, but hopefully people won't feel the need to do that now there's an 'official' one. r? `@Mark-Simulacrum` cc `@caass`
2020-10-08Auto merge of #75470 - estebank:bare-type-expr, r=davidtwcobors-17/+183
Detect blocks that could be struct expr bodies This approach lives exclusively in the parser, so struct expr bodies that are syntactically correct on their own but are otherwise incorrect will still emit confusing errors, like in the following case: ```rust fn foo() -> Foo { bar: Vec::new() } ``` ``` error[E0425]: cannot find value `bar` in this scope --> src/file.rs:5:5 | 5 | bar: Vec::new() | ^^^ expecting a type here because of type ascription error[E0214]: parenthesized type parameters may only be used with a `Fn` trait --> src/file.rs:5:15 | 5 | bar: Vec::new() | ^^^^^ only `Fn` traits may use parentheses error[E0107]: wrong number of type arguments: expected 1, found 0 --> src/file.rs:5:10 | 5 | bar: Vec::new() | ^^^^^^^^^^ expected 1 type argument ``` If that field had a trailing comma, that would be a parse error and it would trigger the new, more targetted, error: ``` error: struct literal body without path --> file.rs:4:17 | 4 | fn foo() -> Foo { | _________________^ 5 | | bar: Vec::new(), 6 | | } | |_^ | help: you might have forgotten to add the struct literal inside the block | 4 | fn foo() -> Foo { Path { 5 | bar: Vec::new(), 6 | } } | ``` Partially address last remaining part of #34255.
2020-10-08Use shorter path for std::hash::Hashest31-6/+6
2020-10-07Bump to 1.48 bootstrap compilerMark Rousskov-17/+10
2020-10-07Unset GIT_DIR in pre-commit hookJoshua Nelson-4/+6
Works around https://github.com/rust-lang/rust/issues/77620
2020-10-07Auto merge of #77597 - simonvandel:uninhabited-hashset, r=jonas-schievinkbors-2/+7
perf: UninhabitedEnumBranching avoid n^2 Avoid n² complexity. This showed up in a profile for match-stress-enum that has 8192 variants I have only profiled locally against `match-stress-enum`, so we should have it perf tested to make sure it does not regress other crates.
2020-10-07Upgrade to tracing 0.2.13Joshua Nelson-12/+6
The primary motivation is to get the changes from https://github.com/tokio-rs/tracing/pull/990. Example output: ``` $ RUSTDOC_LOG=debug rustdoc +rustc2 warning: some trace filter directives would enable traces that are disabled statically | `debug` would enable the DEBUG level for all targets = note: the static max level is `info` = help: to enable DEBUG logging, remove the `max_level_info` feature ``` - Remove useless test This was testing for an ICE when passing `RUST_LOG=rustc_middle`. I noticed it because it started giving the tracing warning (because tests are not run with debug-logging enabled). Since this bug seems unlikely to re-occur, I just removed it altogether.
2020-10-07Auto merge of #76985 - hbina:clone_check, r=estebankbors-1/+13
Prevent stack overflow in deeply nested types. Related issue #75577 (?) Unfortunately, I am unable to test whether this actually solves the problem because apparently, 12GB RAM + 2GB swap is not enough to compile the (admittedly toy) source file.