about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-11-06pointee_info_at() does not need mutable accessMatthias Krüger-1/+1
2021-11-05Auto merge of #90583 - willcrichton:example-analyzer, r=jyn514bors-13/+142
Fix ICE when rustdoc is scraping examples inside of a proc macro This PR provides a clearer semantics for how --scrape-examples interacts with macros. If an expression's span AND it's enclosing item's span both are not `from_expansion`, then the example will be scraped. The added test case `rustdoc-scrape-examples-macros` shows a variety of situations. * A macro-rules macro that takes a function call as input: good * A macro-rules macro that generates a function call as output: bad * A proc-macro that generates a function call as output: bad * An attribute macro that generates a function call as output: bad * An attribute macro that takes a function call as input: good, if the proc macro is designed to propagate the input spans I ran this updated rustdoc on pyo3 and confirmed that it successfully scrapes examples from inside a proc macro, eg <img width="1013" alt="Screen Shot 2021-11-04 at 1 11 28 PM" src="https://user-images.githubusercontent.com/663326/140412691-81a3bb6b-a448-4a1b-a293-f7a795553634.png"> (cc `@mejrs)` Additionally, this PR fixes an ordering bug in the highlighting logic. Fixes https://github.com/rust-lang/rust/issues/90567. r? `@jyn514`
2021-11-05Fix rustdoc-scrape-examples-macros test not being cross-platformWill Crichton-1/+2
2021-11-05Auto merge of #90616 - mathstuf:error_codes-comment-uniformity, r=GuillaumeGomezbors-20/+19
error_codes: uniformly comment error codes
2021-11-05error_codes: uniformly comment error codesBen Boeckel-20/+19
2021-11-05Auto merge of #90604 - mbartlett21:iterator-reexports, r=kennytmbors-1/+6
Re-export some iterators from `core` in `std` These iterators seem to have been forgotten to be re-exported from `std` (through `alloc`) These are stable: `core::slice::{SplitInclusive, SplitInclusiveMut}` This one is still unstable: `core::slice::EscapeAscii` (cc #77174)
2021-11-05Auto merge of #90577 - matthiaskrgr:clippy_perf_nov, r=petrochenkovbors-13/+13
clippy::perf fixes
2021-11-05Fix `str::SplitInclusive` stabilisation datembartlett21-1/+1
2021-11-05Add feature to `alloc` so we can re-export.mbartlett21-0/+1
2021-11-05Re-export `core::slice::EscapeAscii`mbartlett21-0/+2
2021-11-05Re-export `core::slice::SplitInclusive[Mut]`mbartlett21-0/+2
2021-11-05Auto merge of #90598 - JohnTitor:rollup-kz1qioz, r=JohnTitorbors-96/+182
Rollup of 9 pull requests Successful merges: - #90507 (Suggest `extern crate alloc` when using undeclared module `alloc`) - #90530 (Simplify js tester a bit) - #90533 (Add note about x86 instruction prefixes in asm! to unstable book) - #90537 (Update aarch64 `target_feature` list for LLVM 12.) - #90544 (Demote metadata load warning to "info".) - #90554 (Clean up some `-Z unstable-options` in tests.) - #90556 (Add more text and examples to `carrying_{add|mul}`) - #90563 (rustbot allow labels) - #90571 (Fix missing bottom border for headings in sidebar) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-11-04Move rustdoc-scrape-examples-macros test to run-make-fulldepsWill Crichton-0/+0
2021-11-05Rollup merge of #90571 - GuillaumeGomez:missing-bottom-border-sidebar, r=jshaYuki Okushi-17/+26
Fix missing bottom border for headings in sidebar Fixes #90568. r? ```@jsha```
2021-11-05Rollup merge of #90563 - joshtriplett:rustbot-allow-labels, r=Mark-SimulacrumYuki Okushi-0/+2
rustbot allow labels `relnotes` was inspired by https://github.com/rust-lang/rust/pull/90521 , and by the various `must_use` PRs; in all of those cases, the submitter of the PR could know that `relnotes` applied, but couldn't apply it themselves. For `needs-fcp`, I think people should be able to help triage by observing that a change needs an FCP before we can apply it.
2021-11-05Rollup merge of #90556 - scottmcm:carrying_comments, r=joshtriplettYuki Okushi-15/+63
Add more text and examples to `carrying_{add|mul}` `feature(bigint_helper_methods)` tracking issue https://github.com/rust-lang/rust/issues/85532 cc `````@clarfonthey`````
2021-11-05Rollup merge of #90554 - ehuss:unstable-options-cleanup, r=joshtriplettYuki Okushi-38/+27
Clean up some `-Z unstable-options` in tests. Several of these tests were for features that have been stabilized, or otherwise don't need `-Z unstable-options`.
2021-11-05Rollup merge of #90544 - ehuss:demote-locator-warn, r=petrochenkovYuki Okushi-2/+2
Demote metadata load warning to "info". There is a warn log message for whenever the crate loader fails to load metadata from a candidate file. I think this warning is too aggressive, as there are several situations where metadata information might not be found in a candidate file, which is normal. Also, this warning is somewhat confusing, and non-actionable in most cases for a user (most users will not know what it means). If the crate loader ultimately does not find a valid crate, then an error will be reported (and hopefully #88368 will improve that error message). If a rustc developer wants to debug a loader problem, they can still use `RUSTC_LOG=rustc_metadata=debug` and get the details. There is more discussion of this particular warning at https://github.com/rust-lang/rust/issues/89795#issuecomment-940798190. Fixes #90525
2021-11-05Rollup merge of #90537 - adamgemmell:dev/aarch64-target-feature, r=AmanieuYuki Okushi-8/+18
Update aarch64 `target_feature` list for LLVM 12. Many of these feature are now available on all valid LLVM versions. I've also added a few new ones to the list. r? `@Amanieu`
2021-11-05Rollup merge of #90533 - Smittyvb:patch-1, r=joshtriplettYuki Okushi-0/+2
Add note about x86 instruction prefixes in asm! to unstable book Since rustc doesn't do the assembly parsing itself, it is unable to detect when inline assembly ends with an instruction prefix, which doesn't make sense since it would apply to instructions from the compiler. This fixes #82314 by mentioning that x86 instruction prefixes must not be used in inline assembly. AFAICT x86 is the only instruction set with instruction prefixes.
2021-11-05Rollup merge of #90530 - GuillaumeGomez:simplify-js-tester, r=notriddleYuki Okushi-7/+3
Simplify js tester a bit r? `````@notriddle`````
2021-11-05Rollup merge of #90507 - TaKO8Ki:suggest-extern-crate-alloc, r=jackh726Yuki Okushi-9/+39
Suggest `extern crate alloc` when using undeclared module `alloc` closes #90136
2021-11-05Auto merge of #90574 - notriddle:notriddle/doc-fold-stripped-conditional, ↵bors-8/+16
r=camelid,GuillaumeGomez rustdoc: Use conditional for _stripped fold Followup: https://github.com/rust-lang/rust/pull/90475#discussion_r741405472
2021-11-04Auto merge of #90536 - crlf0710:fix_vtable_hrtb, r=jackh726bors-1/+36
Erase regions within `vtable_trait_first_method_offset` Fixes #90177 . r? `@jackh726`
2021-11-04Fix ICE when rustdoc is scraping examples inside of a proc macroWill Crichton-9/+115
2021-11-04Sort scraped call locations before serializingWill Crichton-4/+26
2021-11-04clippy::perf fixesMatthias Krüger-13/+13
2021-11-04Fix missing bottom border for headings in sidebarGuillaume Gomez-17/+26
2021-11-04rustdoc: Use conditional for _stripped foldMichael Howell-8/+16
Followup: https://github.com/rust-lang/rust/pull/90475#discussion_r741405472
2021-11-04Mention possible future rejectionsSmittyvb-1/+1
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-11-04Auto merge of #90564 - flip1995:clippyup, r=Manishearthbors-1534/+3203
Update Clippy r? `@Manishearth`
2021-11-04Update Cargo.lockflip1995-2/+2
2021-11-04Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyupflip1995-1532/+3201
2021-11-04rustbot: Allow applying needs-fcp labelJosh Triplett-0/+1
People should be able to help triage by observing that a change needs an FCP before we can apply it.
2021-11-04rustbot: Allow applying relnotes labelJosh Triplett-0/+1
Inspired by https://github.com/rust-lang/rust/pull/90521 , and by the various `must_use` PRs; in all of those cases, the submitter of the PR could know that `relnotes` applied, but couldn't apply it themselves.
2021-11-04Auto merge of #7929 - flip1995:rustup, r=flip1995bors-61/+57
Rustup r? `@ghost` changelog: none
2021-11-04Bump nightly version -> 2021-11-04flip1995-1/+1
2021-11-04Merge remote-tracking branch 'upstream/master' into rustupflip1995-1549/+3228
2021-11-04Auto merge of #90518 - calebcartwright:rustc-ast-docs, r=wesleywiserbors-3/+2
update rustc_ast crate descriptions in documentation I noticed this the other day and figured I'd suggest a refresh. It seems like a relic from the days of `libsyntax` that got missed as things were split out into separate crates, since the current documentation text references elements that were moved into their own respective crates (e.g. `rustc_parse`)
2021-11-04Add more text and examples to `carrying_{add|mul}"Scott McMurray-15/+63
2021-11-04Auto merge of #87467 - inquisitivecrystal:ref-unwind, r=dtolnaybors-0/+2
Implement `RefUnwindSafe` for `Rc<T>` This PR implements `RefUnwindSafe` for `Rc<T>`, where `T: RefUnwindSafe`. This impl was omitted by an apparent oversight. `Rc<T>` already implements `UnwindSafe`. `Arc<T>` implements both `UnwindSafe` and `RefUnwindSafe`. There is no reason why an `&Rc<T>` is any less unwind safe than a `Rc<T>` or an `&Arc<T>`, so this should be safe to add. Resolves #45924.
2021-11-04Auto merge of #7926 - lengyijun:patch-1, r=giraffatebors-1/+1
lower_case in span_lint_and_help document changelog: none
2021-11-04Update diagnostics.rslyj-1/+1
2021-11-04Auto merge of #90392 - solid-rs:fix-solid-support, r=Mark-Simulacrumbors-4/+4
kmc-solid: Fix SOLID target This PR is a follow-up for #86191 and necessary to make the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets actually usable. - Bumps `libc` to 0.2.106, which includes <https://github.com/rust-lang/libc/pull/2227>. - Applies the change made by #89324 to this target's target-specific code.
2021-11-03Clean up some `-Z unstable-options` in tests.Eric Huss-38/+27
2021-11-04Auto merge of #90179 - Nilstrieb:lifetime-elision-mismatch-hint, r=estebankbors-8/+220
Add beginner friendly lifetime elision hint to E0623 Address #90170 Suggest adding a new lifetime parameter when two elided lifetimes should match up but don't. Example: ``` error[E0623]: lifetime mismatch --> $DIR/issue-90170-elision-mismatch.rs:2:35 | LL | fn foo(slice_a: &mut [u8], slice_b: &mut [u8]) { | --------- --------- these two types are declared with different lifetimes... LL | core::mem::swap(&mut slice_a, &mut slice_b); | ^^^^^^^^^^^^ ...but data from `slice_b` flows into `slice_a` here | = note: each elided lifetime in input position becomes a distinct lifetime help: explicitly declare a lifetime and assign it to both | LL | fn foo<'a>(slice_a: &'a mut [u8], slice_b: &'a mut [u8]) { | ++++ ++ ++ ``` for ```rust fn foo(slice_a: &mut [u8], slice_b: &mut [u8]) { core::mem::swap(&mut slice_a, &mut slice_b); } ```
2021-11-03Auto merge of #90475 - camelid:docvisitor, r=notriddlebors-125/+218
rustdoc: Add `DocVisitor` and use it where possible `DocFolder` allows transforming the docs, accomplished by making its methods take and return types by-value. However, several of the rustdoc `DocFolder` impls only *visit* the docs; they don't change anything. Passing around types by-value is thus unnecessary, confusing, and potentially inefficient for those impls. `DocVisitor` is very similar to `DocFolder`, except that its methods take shared references and return nothing (i.e., the unit type). This should both be more efficient and make the code clearer. There is an additional reason to add `DocVisitor`, too. As part of my cleanup of `external_traits`, I'm planning to add a `fn cache(&mut self) -> &mut Cache` method to `DocFolder` so that `external_traits` can be retrieved explicitly from the `Cache`, rather than implicitly via `Crate.external_traits` (which is an `Rc<RefCell<...>>`). However, some of the `DocFolder` impls that could be turned into `DocVisitor` impls only have a shared reference to the `Cache`, because they are used during rendering. (They have to access the `Cache` via `html::render::Context.shared.cache`, which involves an `Rc`.) Since `DocVisitor` does not mutate any of the types it's visiting, its equivalent `cache()` method will only need a shared reference to the `Cache`, avoiding the problem described above. r? `@GuillaumeGomez` cc `@jyn514`
2021-11-03Demote metadata load warning to "info".Eric Huss-2/+2
2021-11-03Simplify js tester a bitGuillaume Gomez-7/+3
2021-11-03Add beginner friendly lifetime elision hint to E0623Nilstrieb-8/+220
Suggest adding a new lifetime parameter when two elided lifetimes should match up but don't Issue #90170 This also changes the tests introduced by the previous commits because of another rustc issue (#90258)