about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-01-06Style nit: avoid confusing name shadowing in pattern matchDaniel Henry-Mantilla-2/+2
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-01-06Enhance tests based on code reviewDaniel Henry-Mantilla-1/+2
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-01-06Update test assertions (showcases bug)Daniel Henry-Mantilla-7/+31
2021-01-06Style nit: replace `for_each` & `return` with `for` & `continue`Daniel Henry-Mantilla-8/+17
Co-Authored-By: Joshua Nelson <jyn514@gmail.com>
2021-01-06Fix type/value namespace clashes + test for thatDaniel Henry-Mantilla-44/+85
2021-01-06Implement suggestions from code review.Daniel Henry-Mantilla-25/+35
2021-01-06Rustdoc: Fix macros 2.0 and built-in derives being shown at the wrong path.Daniel Henry-Mantilla-5/+60
Fixes #74355 The issue with the built-in derives may be related to: https://github.com/rust-lang/rust/issues/55482#issuecomment-434035721
2021-01-06Auto merge of #80714 - jakevossen5:master, r=lcnrbors-54/+54
fixed const_generics error help Closes https://github.com/rust-lang/rust/issues/80702
2021-01-06Auto merge of #80724 - GuillaumeGomez:remove-useless-doc_alias-feature, r=jyn514bors-23/+17
Remove useless doc_alias feature gate As `@jyn514` rightfully noted in https://github.com/rust-lang/rust/pull/80686 , this feature is no more. Therefore, cleanup time! r? `@jyn514`
2021-01-05Add rustdoc test.Camille GILLOT-0/+14
2021-01-05Remove useless doc_alias featureGuillaume Gomez-23/+17
2021-01-05Auto merge of #80686 - GuillaumeGomez:error-doc-alias-same-name, r=jyn514bors-0/+24
Error when #[doc(alias)] has same name as the item Something I came across when reviewing some doc alias PRs. r? `@jyn514`
2021-01-05fixed feature gate stderrJake Vossen-1/+1
2021-01-05fixed const_generics error helpJake Vossen-53/+53
2021-01-05Auto merge of #80708 - JohnTitor:rollup-6esk027, r=JohnTitorbors-16/+79
Rollup of 12 pull requests Successful merges: - #80442 (Mention Arc::make_mut and Rc::make_mut in the documentation of Cow) - #80533 (bootstrap: clippy fixes) - #80538 (Add check for `[T;N]`/`usize` mismatch in astconv) - #80612 (Remove reverted change from relnotes) - #80627 (Builder: Warn if test file does not exist) - #80637 (Use Option::filter instead of open-coding it) - #80643 (Move variable into the only branch where it is relevant) - #80656 (Fixed documentation error for `std::hint::spin_loop`) - #80666 (Fix missing link for "fully qualified syntax") - #80672 (./x.py clippy: allow the most noisy lints) - #80677 (doc -- list edit for consistency) - #80696 (make sure that promoteds which fail to evaluate in dead const code behave correctly) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-01-05Rollup merge of #80696 - RalfJung:failing-promoteds, r=oli-obkYuki Okushi-2/+13
make sure that promoteds which fail to evaluate in dead const code behave correctly https://github.com/rust-lang/rust/pull/80243 showed that we'll have to live with these kinds of failing promoteds for a while, so let's make sure we have a test that covers them.
2021-01-05Rollup merge of #80672 - matthiaskrgr:xpy_clippy_less_noise, r=Mark-SimulacrumYuki Okushi-0/+11
./x.py clippy: allow the most noisy lints This silences the following clippy lints in ./x.py clippy: many_single_char_names (there are a lot of warnings caused by stdarch) collapsible_if (can reduce readability) type_complexity missing_safety_doc (there are almost 3K warnings issued) too_many_arguments needless_lifetimes (people want 'tcx lifetimes etc) wrong_self_convention (warns about from_..(), to_..(), into_..().. fns that do or do not take self by reference. Just for clarification; this only changes the output of `x.py clippy` inside the rustc repo and does not change anything about clippy or how `cargo clippy` is run on peoples crates.
2021-01-05Rollup merge of #80627 - bugadani:warn, r=Mark-SimulacrumYuki Okushi-1/+13
Builder: Warn if test file does not exist Running `./x.py test` with a file that does not exists (but where the path belongs to a test suite) silently ignores the missing file and runs the whole test suite. This PR prints a warning to reduce the potential surprise factor. Closes #80621
2021-01-05Rollup merge of #80538 - JulianKnodt:err_usize, r=lcnrYuki Okushi-0/+25
Add check for `[T;N]`/`usize` mismatch in astconv Helps clarify the issue in #80506 by adding a specific check for mismatches between [T;N] and usize. r? `@lcnr`
2021-01-05Rollup merge of #80533 - matthiaskrgr:bootstrap_clppy, r=Mark-SimulacrumYuki Okushi-13/+17
bootstrap: clippy fixes addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2021-01-05Auto merge of #80426 - jyn514:bootstrap-caching, r=Mark-Simulacrumbors-10/+11
Don't use `self.date` unconditionally for `program_out_of_date()` This avoids unnecessary cache invalidations for programs not affected by the stage0 version (which is everything except the stage0 compiler itself). The redundant invalidations weren't noticed until now because they only showed up on stage0 bumps, at which point people are used to rebuilding everything anyway. I noticed it in https://github.com/rust-lang/rust/pull/79540 because I wasn't adding `self.date` to the stamp file (because I didn't realize it was necessary). Rather than adding self.date I thought it was better to remove it from the cache key.
2021-01-04make sure that promoteds which fail to evaluate in dead const code behave ↵Ralf Jung-2/+13
correctly
2021-01-04Auto merge of #80688 - ehuss:update-mdbook, r=pietroalbinibors-1/+1
[security] Update mdbook Changelog from 0.4.3 to 0.4.5: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-045
2021-01-04Add tests for new doc alias checkGuillaume Gomez-0/+24
2021-01-04Update mdbookEric Huss-1/+1
2021-01-04Builder: Warn if test file does not existDániel Buga-1/+13
2021-01-04Auto merge of #80651 - GroteGnoom:issue-78123-fix, r=Nadrierilbors-0/+29
Add note to non-exhaustive match on reference to empty Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123
2021-01-04Auto merge of #80661 - jyn514:duplicate-types, r=GuillaumeGomezbors-31/+53
Cleanup rustdoc handling of associated types This is best reviewed a commit at a time. No particular reason for these changes, they just stood out as I was reviewing https://github.com/rust-lang/rust/pull/80653 and thinking about https://github.com/rust-lang/rust/issues/80379. The new test case worked before, it just wasn't tested. r? `@GuillaumeGomez`
2021-01-04Add check for array/usize mismatch in astconvkadmin-0/+25
2021-01-04Auto merge of #80554 - GuillaumeGomez:more-js-cleanup, r=jyn514bors-18/+12
More js cleanup Part of #79052 (Same kind as #80515). This one is about some small fixes: * Replacing some loops with `onEachLazy`. * Removing unused function arguments. * Turn `buildHelperPopup` into a variable so it can be "replaced" once the function has been called once so it's not called again. r? `@jyn514`
2021-01-04Auto merge of #80418 - oli-obk:this_could_have_been_so_simple, r=RalfJungbors-55/+126
Allow references to interior mutable data behind a feature gate supercedes #80373 by simply not checking for interior mutability on borrows of locals that have `StorageDead` and thus can never be leaked to the final value of the constant tracking issue: https://github.com/rust-lang/rust/issues/80384 r? `@RalfJung`
2021-01-04./x.py clippy: allow the most noisy lintsMatthias Krüger-0/+11
This silences the following clippy lints in ./x.py clippy: many_single_char_names (there are a lot of warnings caused by stdarch) collapsible_if (can reduce readability) type_complexity missing_safety_doc (there are almost 3K warnings issued) too_many_arguments needless_lifetimes (people want 'tcx lifetimes etc) wrong_self_convention (warns about from_..(), to_..(), into_..().. fns that do or do not take self by reference.
2021-01-03Don't clone `type_` unnecessarilyJoshua Nelson-8/+24
2021-01-03Simplify rustdoc handling of type aliases for associated typesJoshua Nelson-31/+37
The logic was very hard to follow before.
2021-01-03Auto merge of #77859 - bugadani:no-duplicate-ref-link-error, r=jyn514bors-67/+175
Rustdoc: only report broken ref-style links once This PR assigns the markdown `LinkType` to each parsed link and passes this information into the link collector. If a link can't be resolved in `resolve_with_disambiguator`, the failure is cached for the link types where we only want to report the error once (namely `Shortcut` and `Reference`). Fixes #77681
2021-01-03Add notes to stderr of non-exhaustive-reference testDaniel Noom-2/+6
2021-01-03Add note on void reference testDaniel Noom-0/+1
This test is also changed by adding a note about uninhabited references still counting as inhabited.
2021-01-03Add note to non-exhaustive match on reference to emptyDaniel Noom-0/+24
Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123
2021-01-03Only report reference-style link errors onceDániel Buga-67/+175
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-01-03Rollup merge of #80628 - matthiaskrgr:match_ref_pats, r=varkorGuillaume Gomez-4/+4
reduce borrowing and (de)referencing around match patterns (clippy::match_ref_pats)
2021-01-03Rollup merge of #80617 - ↵Guillaume Gomez-1/+11
GuillaumeGomez:detect-invalid-rustdoc-test-commands, r=jyn514 Detect invalid rustdoc test commands Fixes #80570. There are now errors displayed in case of bad command syntax: ``` ---- [rustdoc] rustdoc/remove-url-from-headings.rs stdout ---- error: htmldocck failed! status: exit code: 1 command: "/usr/bin/python" "/home/imperio/rust/rust/src/etc/htmldocck.py" "/home/imperio/rust/rust/build/x86_64-unknown-linux-gnu/test/rustdoc/remove-url-from-headings" "/home/imperio/rust/rust/src/test/rustdoc/remove-url-from-headings.rs" stdout: ------------------------------------------ ------------------------------------------ stderr: ------------------------------------------ 3: Invalid command: `!`@has`,` (try with ``@!has`)` // !`@has` - '//a[`@href="http://a.a"]'` Encountered 1 errors ``` r? `@camelid`
2021-01-03Rollup merge of #80580 - GuillaumeGomez:suggestion-ignore-codeblock-warn, ↵Guillaume Gomez-6/+45
r=jyn514 Add suggestion for "ignore" doc code block Part of https://github.com/rust-lang/rust/issues/30032. This PR adds a suggestion to help users when they have a "ignore" doc code block which is invalid rust code. r? `@jyn514`
2021-01-03Stylistic fixes to diagnostic messagesoli-1/+1
2021-01-03Refactor the non-transient cell borrow error diagnosticoli-22/+24
2021-01-03Inline resetMouseMoved function directly into "mousemove" event handlerGuillaume Gomez-5/+1
2021-01-03Replace some loops with "onEachLazy" callGuillaume Gomez-13/+11
2021-01-03Create a "is_ignore" variable instead of doing the comparison multiple timesGuillaume Gomez-3/+4
2021-01-03Update now-more-precise operation with a preciser messageoli-14/+14
2021-01-03Detect invalid rustdoc test commandsGuillaume Gomez-1/+11
2021-01-03Auto merge of #80261 - GuillaumeGomez:attr-rework, r=jyn514bors-164/+145
rustdoc DocFragment rework Kind of a follow-up of #80119. A few things are happening in this PR. I'm not sure about the impact on perf though so I'm very interested about that too (if the perf is worse, then we can just close this PR). The idea here is mostly about reducing the memory usage by relying even more on `Symbol` instead of `String`. The only issue is that `DocFragment` has 3 modifications performed on it: 1. Unindenting 2. Collapsing similar comments into one 3. "Beautifying" (weird JS-like comments handling). To do so, I saved the information about unindent and the "collapse" is now on-demand (which is why I'm not sure the perf will be better, it has to be run multiple times...). r? `@jyn514`