about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-05-12Fix indent in JS filesGuillaume Gomez-138/+140
2021-05-12Remove unused CSS rulesGuillaume Gomez-71/+2
2021-05-12Remove "loading content" which is now unnecessaryGuillaume Gomez-65/+8
2021-05-12Auto merge of #85206 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 8 commits in e51522ab3db23b0d8f1de54eb1f0113924896331..070e459c2d8b79c5b2ac5218064e7603329c92ae 2021-05-07 21:29:52 +0000 to 2021-05-11 18:12:23 +0000 - Fix rustdoc warnings (rust-lang/cargo#9468) - Improve performance of git status check in `cargo package`. (rust-lang/cargo#9478) - Link to the new rustc tests chapter. (rust-lang/cargo#9477) - Bump index cache version to deal with semver metadata version mismatch. (rust-lang/cargo#9476) - Fix Url::into_string deprecation warning (rust-lang/cargo#9475) - Fix rust-lang/cargo#4482 and rust-lang/cargo#9449: set Fossil ignore and clean settings locally (rust-lang/cargo#9469) - Improve two error messages (rust-lang/cargo#9472) - Fix `cargo install` with a semver metadata version. (rust-lang/cargo#9467)
2021-05-12Auto merge of #85192 - klensy:bump-deps, r=Mark-Simulacrumbors-1/+0
updated deps filetime v0.2.12 -> v0.2.14 https://github.com/alexcrichton/filetime/compare/0.2.12...0.2.14 socket2 v0.3.16 -> v0.3.19 https://github.com/rust-lang/socket2/commits/v0.3.x tar v0.4.29 -> v0.4.33 https://github.com/alexcrichton/tar-rs/compare/0.4.29...0.4.33 this drops dependency on redox_syscall 0.1.* --- measureme v9.1.0 -> v9.1.1 https://github.com/rust-lang/measureme/compare/9.1.0...9.1.1 this drops dependency on memmap v0.7.0 --- version_check v0.9.1 -> v0.9.3 https://github.com/SergioBenitez/version_check/compare/v0.9.1...v0.9.3 fixes version parse
2021-05-11Update cargoEric Huss-0/+0
2021-05-12Rollup merge of #85196 - richkadel:reverts-cover-unreachable-statements, ↵Yuki Okushi-54/+49
r=tmandry Revert "Auto merge of #84797 - richkadel:cover-unreachable-statements… This reverts commit e5f83d24aee866a14753a7cedbb4e301dfe5bef5, reversing changes made to ac888e8675182c703c2cd097957878faf88dad94. See https://github.com/rust-lang/rust/pull/84797#issuecomment-839068132 r? `@tmandry`
2021-05-12Rollup merge of #85191 - GuillaumeGomez:improve-rustdoc-gui-tester, ↵Yuki Okushi-27/+43
r=Mark-Simulacrum Improve rustdoc gui tester I cherry-picked the commit from https://github.com/rust-lang/rust/pull/84834 (and modified it a bit). I also used this opportunity to update it to last version (forgot to update GUI test in https://github.com/rust-lang/rust/pull/85074, really can't wait to make https://github.com/rust-lang/rust/pull/84586 finally work). cc `@Mark-Simulacrum` for the changes in bootstrap. r? `@jsha`
2021-05-12Rollup merge of #85187 - FabianWolff:issue-84976, r=jackh726Yuki Okushi-0/+52
Use .name_str() to format primitive types in error messages This pull request fixes #84976. The problem described there is caused by this code https://github.com/rust-lang/rust/blob/506e75cbf8cb5305e49a41326307004ca3976029/compiler/rustc_middle/src/ty/error.rs#L161-L166 using `Debug` formatting (`{:?}`), while the proper solution is to call `name_str()` of `ty::IntTy`, `ty::UintTy` and `ty::FloatTy`, respectively.
2021-05-12Rollup merge of #85124 - jsha:trust-the-bool, r=GuillaumeGomezYuki Okushi-69/+64
rustdoc: remove explicit boolean comparisons. For boolean variables it's shorter and more readable to check the value directly, or negate it with `!`. In a couple of cases I reordered an if/else pair because it made the initial `if` statement simpler. An example of a style guide recommending this: https://airbnb.io/javascript/#comparison--shortcuts r? `@GuillaumeGomez`
2021-05-12Rollup merge of #85018 - hi-rustin:rustin-patch-84637, r=estebankYuki Okushi-80/+118
shrinking the deprecated method span close https://github.com/rust-lang/rust/issues/84637
2021-05-12Rollup merge of #83501 - camelid:rustdoc-layout, r=jyn514,GuillaumeGomezYuki Okushi-4/+145
rustdoc: Add unstable CLI option to show basic type layout information Closes #75988. Right now it just shows the size.
2021-05-11Add explanatory comment to the issue-84976.rs test caseFabian Wolff-4/+8
2021-05-11Revert "Auto merge of #84797 - richkadel:cover-unreachable-statements, ↵Rich Kadel-54/+49
r=tmandry" This reverts commit e5f83d24aee866a14753a7cedbb4e301dfe5bef5, reversing changes made to ac888e8675182c703c2cd097957878faf88dad94.
2021-05-11fix tidyklensy-1/+0
2021-05-11Make rustdoc-gui test suite able to run with different sub directoriesGuillaume Gomez-3/+3
2021-05-11Update toggle-docs GUI test to last versionGuillaume Gomez-4/+7
2021-05-11Move rustdoc-gui rust libraries into their own folder and prepare the field ↵Guillaume Gomez-21/+34
for more libraries
2021-05-11rustdoc: remove explicit boolean comparisons.Jacob Hoffman-Andrews-69/+64
For boolean variables it's shorter and more readable to check the value directly, or negate it with `!`. In a couple of cases I reordered an if/else pair because it made the initial `if` statement simpler. Removed unused isType parameter from two functions.
2021-05-11Disable layout docs for type aliases for nowCamelid-6/+0
There are issues with computing layout for type aliases; see #85103. Once the issues are fixed, we should re-enable layout docs for them.
2021-05-11Enable `--show-type-layout` for the rustdoc API docsCamelid-0/+1
2021-05-11Add note to docs when layout cannot be computedCamelid-8/+35
This should prevent confusion about why generic types don't have layout docs.
2021-05-11Add test case for zero-sized typesCamelid-0/+4
2021-05-11Make test more specificCamelid-1/+1
2021-05-11Apply suggestions from code reviewCamelid-3/+4
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-05-11Add `tcx` local variableCamelid-3/+4
2021-05-11Fix a few small thingsCamelid-6/+6
2021-05-11Enable `--show-type-layout` for the rustc API docsCamelid-0/+1
2021-05-11Only show type layout info if `--show-type-layout` is passedCamelid-0/+21
2021-05-11Show memory layout for type aliasesCamelid-2/+6
At first you might think "why not just click through to the aliased type?", but if a type alias instantiates all of the generic parameters of the aliased type, then it can show layout info even though the aliased type cannot (because we can't compute the layout of a generic type). So I think it's still useful to show layout info for type aliases.
2021-05-11Add test for memory layout informationCamelid-0/+43
2021-05-11Include a warning in the layout docs that layout is unstableCamelid-3/+12
2021-05-11Remove FIXMECamelid-2/+4
Layout errors can occur with valid code, e.g. generic types.
2021-05-11rustdoc: Show basic type layout informationCamelid-3/+36
Right now it just shows the size.
2021-05-11Auto merge of #82272 - b-naber:gat_diag, r=estebank,jackh726bors-589/+736
Improve diagnostics for GATs Fixes https://github.com/rust-lang/rust/issues/81801 Fixes https://github.com/rust-lang/rust/issues/81961 Fixes https://github.com/rust-lang/rust/issues/81862 r? `@estebank`
2021-05-11Use .name_str() to format primitive types in error messagesFabian Wolff-0/+48
2021-05-11Auto merge of #85023 - RalfJung:array-to-raw-elem, r=Mark-Simulacrumbors-18/+241
array-to-raw-elem cast: test that Retag covers entire array Make sure that we `Retag` *before* doing the `ArrayToPointer` cast.
2021-05-11improve diagnosts for GATsb-naber-589/+736
2021-05-11Auto merge of #85109 - RalfJung:remove-const_fn, r=oli-obkbors-132/+52
remove const_fn feature gate Fixes https://github.com/rust-lang/rust/issues/84510 r? `@oli-obk`
2021-05-11fix clippy testRalf Jung-7/+6
2021-05-11Auto merge of #85100 - HKalbasi:issue-68049-fix, r=Aaron1011bors-0/+67
Fix invalid suggestion of changing impl trait signature Fix #68049
2021-05-11Auto merge of #80300 - LeSeulArtichaut:80275-doc-inline, r=Manishearthbors-74/+220
Emit errors/warns on some wrong uses of rustdoc attributes This PR adds a few diagnostics: - error if conflicting `#[doc(inline)]`/`#[doc(no_inline)]` are found - introduce the `invalid_doc_attributes` lint (warn-by-default) which triggers: - if a crate-level attribute is used on a non-`crate` item - if `#[doc(inline)]`/`#[doc(no_inline)]` is used on a non-`use` item The code could probably be improved but I wanted to get feedback first. Also, some of those changes could be considered breaking changes, so I don't know what the procedure would be? ~~And finally, for the warnings, they are currently hard warnings, maybe it would be better to introduce a lint?~~ (EDIT: introduced the `invalid_doc_attributes` lint) Closes #80275. r? `@jyn514`
2021-05-11Fix CI problemshamidreza kalbasi-3/+3
2021-05-11Auto merge of #85165 - JohnTitor:rollup-ew1ls7x, r=JohnTitorbors-8/+26
Rollup of 7 pull requests Successful merges: - #84777 (Apply `--cfg parallel_compiler` when documenting) - #84783 (Allow formatting specific subdirectories) - #84998 (Show nicer error when an 'unstable fingerprints' error occurs) - #85002 (RELEASES.md: Use broken_intra_doc_links as an example, not nightly lint) - #85051 (Allow checking miri and RLS with `x.py check src/tools/{miri,rls}`) - #85114 (Remove outdated FIXME for download-rustc) - #85143 (Document Rc::from) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-05-11Rollup merge of #85051 - jyn514:check-miri, r=Mark-SimulacrumYuki Okushi-1/+6
Allow checking miri and RLS with `x.py check src/tools/{miri,rls}` Helps with https://github.com/rust-lang/rust/issues/80639. `@Xanewok` would you find this useful for RLS too?
2021-05-11Rollup merge of #84783 - jyn514:fmt-one, r=Mark-SimulacrumYuki Okushi-7/+19
Allow formatting specific subdirectories Fixes https://github.com/rust-lang/rust/issues/71094.
2021-05-11Rollup merge of #84777 - jyn514:rustdoc-parallel, r=Mark-SimulacrumYuki Okushi-0/+1
Apply `--cfg parallel_compiler` when documenting This also reverts commit 9823c2cc700fea541bf2670fcee93af662b63022 working around the bug. Fixes https://github.com/rust-lang/rust/issues/82301.
2021-05-11Auto merge of #85012 - FabianWolff:struct-rec, r=davidtwcobors-0/+138
Fix stack overflow when checking for structural recursion This pull request aims to fix #74224 and fix #84611. The current logic for detecting ADTs with structural recursion is flawed because it only looks at the root type, and then for exact matches. What I mean by this is that for examples such as: ```rust struct A<T> { x: T, y: A<A<T>>, } struct B { z: A<usize> } fn main() {} ``` When checking `A`, the compiler correctly determines that it has an infinite size (because the "root" type is `A`, and `A` occurs, albeit with different type arguments, as a nested type in `A`). However, when checking `B`, it also recurses into `A`, but now `B` is the root type, and it only checks for _exact_ matches of `A`, but since `A` never precisely contains itself (only `A<A<T>>`, `A<A<A<T>>>`, etc.), an endless recursion ensues until the stack overflows. In this PR, I have attempted to fix this behavior by implementing a two-phase checking: When checking `B`, my code first checks `A` _separately_ and stops if `A` already turns out to be infinite. If not (such as for `Option<T>`), the second phase checks whether the root type (`B`) is ever nested inside itself, e.g.: ```rust struct Foo { x: Option<Option<Foo>> } ``` Special care needs to be taken for mutually recursive types, e.g.: ```rust struct A<T> { z: T, x: B<T>, } struct B<T> { y: A<T> } ``` Here, both `A` and `B` both _are_ `SelfRecursive` and _contain_ a recursive type. The current behavior, which I have maintained, is to treat both `A` and `B` as `SelfRecursive`, and accordingly report errors for both.
2021-05-10Auto merge of #84677 - CDirkx:pal, r=Mark-Simulacrumbors-48/+28
Fix `tidy` platform-specific code check I noticed new platform-specific code was introduced outside of `std::sys` ([example](https://github.com/rust-lang/rust/blob/master/library/std/src/thread/available_concurrency.rs)), which should have been checked against by `tidy`. Apparently there are 2 problems with the current check implementation: - It ignores everything after encountering "mod tests", which is often at the very top of a file. - There was a bug where when checking the byte immediately before a found string, the first byte of the file was checked instead. I fixed the bug and made excluding tests a bit more robust by instead adding the following rules: - Files with a path containing either `tests` or `benches` are excluded. - A `cfg(...)` containing `test` is excluded. (Tests are excluded because almost all tests have something like `#[cfg(not(target_os = "emscripten"))]` somewhere.) The fixed check found some more cases of platform-specific code; for now I have explicitly excluded them and added a FIXME stating that the platform-specific code must be moved to `sys`.
2021-05-10Rollup merge of #85148 - GuillaumeGomez:source-code-line-number, r=jshaGuillaume Gomez-19/+40
Fix source code line number display and make it clickable again Fixes https://github.com/rust-lang/rust/issues/85119. I used the same logic we're using for other codeblocks: putting the line number `<span>`s into the `example-wrap` directly and then add `display: inline-flex` on `example-wrap`. r? `@jsha`