about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-04-19Rollup merge of #84330 - GuillaumeGomez:remove-footer, r=jyn514Dylan DPC-1/+0
Remove unused footer section I realized yesterday while working on docs.rs that rustdoc was generating a "footer"section that it doesn't use. No need to keep it then. r? `@jyn514`
2021-04-19Rollup merge of #84313 - lcnr:sized-err-msg, r=petrochenkovDylan DPC-37/+64
fix suggestion for unsized function parameters taken from `@fasterthanlime's` article https://fasterthanli.me/articles/whats-in-the-box
2021-04-19Rollup merge of #84291 - RalfJung:thread-local-const-init, r=alexcrichtonDylan DPC-1/+1
fix aliasing violations in thread_local_const_init Fixes https://github.com/rust-lang/rust/pull/83416#discussion_r615364774 r? `@alexcrichton` `@sfackler`
2021-04-19Rollup merge of #84256 - tspiteri:pretty-minus-zero, r=workingjubileeDylan DPC-4/+4
doc: use U+2212 for minus sign in floating-point -0.0 remarks Also remove plus sign in `-0.0 == +0.0` to make it a valid expression.
2021-04-19Rollup merge of #84168 - cjgillot:asi, r=davidtwcoDylan DPC-4/+32
Lower async fn in traits. An error is already created by AST validation. Fixes #84149
2021-04-19Rollup merge of #84126 - 12101111:musl-sanitizer, r=davidtwcoDylan DPC-1/+6
Enable sanitizers for x86_64-unknown-linux-musl Those 4 sanitizers get musl target support in LLVM 12 release.
2021-04-19Rollup merge of #84123 - bjorn3:compile_mono_item_dep_node, r=wesleywiserDylan DPC-9/+39
Introduce CompileMonoItem DepNode This is likely required for allowing efficient hot code swap support in cg_clif's jit mode. My prototype currently requires re-compiling all functions, which is both slow and uses a lot of memory as there is not support for freeing the memory used by replaced functions yet. cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/1087
2021-04-19fix suggestion for unsized function parameterslcnr-37/+64
2021-04-19Auto merge of #84294 - WaffleLapkin:patch-2, r=jonas-schievinkbors-2/+2
Slightly change wording in doc comment and fix typo in vec/mod.rs Suggested by `@pickfire` in https://github.com/rust-lang/rust/pull/82760
2021-04-19Remove unused footer sectionGuillaume Gomez-1/+0
2021-04-19Auto merge of #84283 - jsha:de-emphasize-attributes, r=GuillaumeGomezbors-4/+10
rustdoc: Reduce visual weight of attributes. Followup from #83337. As part of that PR, we stopped hiding attributes behind a toggle, because most things have just zero or one attributes. However, this made clear that the current rendering of attributes emphasizes them a lot, which distracts from function signatures. This PR changes their color of attributes to be the same as the toggles, and reduces their font weight. This also removes `#[lang]` from the list of ALLOWED_ATTRIBUTES. This attribute is an implementation detail rather than part of the public-facing documentation. ![image](https://user-images.githubusercontent.com/220205/115131061-cc407d80-9fa9-11eb-9a77-ad3f3217f391.png) Demo at https://hoffman-andrews.com/rust/de-emph-attr/std/string/struct.String.html#method.trim
2021-04-19Auto merge of #84316 - teymour-aldridge:improve-defaulted-never-note, ↵bors-8/+12
r=petrochenkov Improve an error message.
2021-04-19Auto merge of #84288 - notriddle:short-links, r=jyn514bors-52/+44
rustdoc: get rid of CURRENT_DEPTH Fixes #82742
2021-04-19Update library/std/src/primitive_docs.rsTrevor Spiteri-2/+2
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2021-04-18Auto merge of #83799 - crlf0710:stablize_non_ascii_idents, r=Manishearthbors-546/+163
Stablize `non-ascii-idents` This is the stablization PR for RFC 2457. Currently this is waiting on fcp in [tracking issue](https://github.com/rust-lang/rust/issues/55467). r? `@Manishearth`
2021-04-18Auto merge of #78880 - CDirkx:not_supported, r=joshtriplettbors-56/+81
Add `Unsupported` to `std::io::ErrorKind` I noticed a significant portion of the uses of `ErrorKind::Other` in std is for unsupported operations. The notion that a specific operation is not available on a target (and will thus never succeed) seems semantically distinct enough from just "an unspecified error occurred", which is why I am proposing to add the variant `Unsupported` to `std::io::ErrorKind`. **Implementation**: The following variant will be added to `std::io::ErrorKind`: ```rust /// This operation is unsupported on this platform. Unsupported ``` `std::io::ErrorKind::Unsupported` is an error returned when a given operation is not supported on a platform, and will thus never succeed; there is no way for the software to recover. It will be used instead of `Other` where appropriate, e.g. on wasm for file and network operations. `decode_error_kind` will be updated to decode operating system errors to `Unsupported`: - Unix and VxWorks: `libc::ENOSYS` - Windows: `c::ERROR_CALL_NOT_IMPLEMENTED` - WASI: `wasi::ERRNO_NOSYS` **Stability**: This changes the kind of error returned by some functions on some platforms, which I think is not covered by the stability guarantees of the std? User code could depend on this behavior, expecting `ErrorKind::Other`, however the docs already mention: > Errors that are `Other` now may move to a different or a new `ErrorKind` variant in the future. It is not recommended to match an error against `Other` and to expect any additional characteristics, e.g., a specific `Error::raw_os_error` return value. The most recent variant added to `ErrorKind` was `UnexpectedEof` in `1.6.0` (almost 5 years ago), but `ErrorKind` is marked as `#[non_exhaustive]` and the docs warn about exhaustively matching on it, so adding a new variant per se should not be a breaking change. The variant `Unsupported` itself could be marked as `#[unstable]`, however, because this PR also immediately uses this new variant and changes the errors returned by functions I'm inclined to agree with the others in this thread that the variant should be insta-stabilized.
2021-04-18Improve an error message.teymour-aldridge-8/+12
2021-04-18Auto merge of #84274 - nagisa:fix-simd, r=nikicbors-131/+154
Don't set fast-math for the SIMD operations we set it for previously Instead of `fast-math`. `fast-math` implies things like functions not being able to accept as an argument or return as a result, say, `inf` which made these functions confusingly named or behaving incorrectly, depending on how you interpret it. It seems that the intended behaviour was to set a `afn` flag instead. In doing so we also renamed the intrinsics to say `_approx` so that it is clear these are not precision oriented and the users can act accordingly. Fixes #84268
2021-04-18Auto merge of #84285 - hi-rustin:rustin-patch-search, r=GuillaumeGomezbors-1/+1
Fix the wrong return value type description of validateResult It's should be boolean not [boolean].
2021-04-18Slightly change wording and fix typo in vec/mod.rsWaffle Lapkin-2/+2
2021-04-18fix aliasing violations in thread_local_const_initRalf Jung-1/+1
2021-04-18Fix clippy test using `ErrorKind`Christiaan Dirkx-2/+4
2021-04-18Bump to 1.53.0CDirkx-1/+1
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2021-04-18Fix test `metadata_access_times` to also check for `Unsupported`Christiaan Dirkx-1/+3
2021-04-18Rename `NotSupported` to `Unsupported`Christiaan Dirkx-18/+29
2021-04-18Use `NotSupported` in more placesChristiaan Dirkx-47/+48
2021-04-18Bump since to 1.52.0CDirkx-1/+1
2021-04-18Update `decode_error_kind` to decode os errors to `NotSupported`Christiaan Dirkx-0/+4
2021-04-18Add and insta-stabilize `std::io::ErrorKind::NotSupported`Christiaan Dirkx-6/+11
2021-04-18Auto merge of #84207 - SimonSapin:deprecate-core-raw, r=dtolnaybors-1/+11
Deprecate the core::raw / std::raw module It only contains the `TraitObject` struct which exposes components of wide pointer. Pointer metadata APIs are designed to replace this: https://github.com/rust-lang/rust/issues/81513
2021-04-17rustdoc: get rid of CURRENT_DEPTHMichael Howell-52/+44
2021-04-18Auto merge of #84065 - c410-f3r:tests-tests-tests, r=petrochenkovbors-1/+1
Move some tests to more reasonable directories - 6 cc #73494 r? `@petrochenkov` git mv bad/bad-const-type.* static/ git mv bad/bad-crate-name.* extern git mv bad/bad-env-capture* fn/ git mv bad/bad-expr-lhs.* expr/ git mv bad/bad-expr-path* expr/ git mv bad/bad-extern-link-attrs.* extern/ git mv bad/bad-intrinsic-monomorphization.* intrinsics/ git mv bad/bad-lint-cap* lint/ git mv bad/bad-main.* fn git mv bad/bad-method-typaram-kind.* type/ git mv bad/bad-mid-path-type-params.* fn git mv bad/bad-module.* modules/ git mv bad/bad-sized.* type/ git mv bad/bad-type-env-capture.* fn
2021-04-18Fix the wrong return value type description of validateResulthi-rustin-1/+1
2021-04-18Auto merge of #84064 - hyd-dev:unknown-lints, r=petrochenkovbors-44/+85
Do not ignore path segments in the middle in `#[allow]`/`#[warn]`/`#[deny]`/`#[forbid]` attributes Fixes #83477.
2021-04-17Reduce visual weight of attributes.Jacob Hoffman-Andrews-4/+10
2021-04-17Auto merge of #84061 - ↵bors-76/+76
AngelicosPhosphoros:issue-75598-add-inline-always-arithmetic, r=nagisa Add some #[inline(always)] to arithmetic methods of integers I tried to add it only to methods which return results of intrinsics and don't have any branching. Branching could made performance of debug builds (`-Copt-level=0`) worse. Main goal of changes is allowing wider optimizations in `-Copt-level=1`. Closes: https://github.com/rust-lang/rust/issues/75598 r? `@nagisa`
2021-04-17Move some tests to more reasonable directories - 6Caio-1/+1
2021-04-17Auto merge of #84279 - Dylan-DPC:rollup-k7otd7e, r=Dylan-DPCbors-2254/+2295
Rollup of 4 pull requests Successful merges: - #83237 (rustdoc: use more precise relative URLs) - #84150 (rustdoc: move some search code into search.js) - #84203 (rustdoc: Give a more accurate span for anchor failures) - #84257 (Add documentation to help people find `Ipv4Addr::UNSPECIFIED`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-17Don't set `fast`(-math) for certain simd opsSimonas Kazlauskas-131/+154
`fast-math` implies things like functions not being able to accept as an argument or return as a result, say, `inf` which made these functions confusingly named or behaving incorrectly, depending on how you interpret it. Since the time when these intrinsics have been implemented the intrinsics user's (stdsimd) approach has changed significantly and so now it is required that these intrinsics operate normally rather than in "whatever" way. Fixes #84268
2021-04-17Rollup merge of #84257 - joshtriplett:inaddr-any, r=m-ou-seDylan DPC-0/+3
Add documentation to help people find `Ipv4Addr::UNSPECIFIED` People looking for `INADDR_ANY` don't always find `Ipv4Addr::UNSPECIFIED`; add some documentation to help.
2021-04-17Rollup merge of #84203 - jyn514:anchor-span, r=euclioDylan DPC-14/+34
rustdoc: Give a more accurate span for anchor failures r? `@euclio`
2021-04-17Rollup merge of #84150 - jsha:defer-search-js, r=GuillaumeGomezDylan DPC-1693/+1682
rustdoc: move some search code into search.js This reduces main.s from 3094 lines to 1587. Also it saves some bytes of download in the case where search isn't used. There were a fair number of variables that needed to be accessible in both main.js and search.js, but I didn't want to put too many symbols in the global namespace, so I consolidated much of the search-related state and functions into a new object `window.searchState`. Demo at https://hoffman-andrews.com/rust/move-search/std/?search=foo
2021-04-17Rollup merge of #83237 - notriddle:short-links, r=jyn514Dylan DPC-547/+576
rustdoc: use more precise relative URLs This is a fairly large diff, and will probably conflict with https://github.com/rust-lang/rust/pull/82815 since it reduces (but does not eliminate) the use of the old depth variable. Instead of using a depth counter and adding "../" to get to the top, this commit makes rustdoc actually compare the path of what it's linking from to the path that it's linking to. This makes the resulting HTML shorter. Here's a comparison of one of the largest (non-source) files in the Rust standard library docs (about 4% improvement before gzipping). $ wc -c struct.Wrapping.old.html struct.Wrapping.new.html 2387389 struct.Wrapping.old.html 2298538 struct.Wrapping.new.html Most if it can be efficiently gzipped away. $ wc -c struct.Wrapping.old.html.gz struct.Wrapping.new.html.gz 70679 struct.Wrapping.old.html.gz 70050 struct.Wrapping.new.html.gz But it also makes a difference in the final DOM size, reducing it from 91MiB to 82MiB.
2021-04-17rustdoc: Give a more accurate span for anchor failuresJoshua Nelson-14/+34
2021-04-17Auto merge of #84270 - nagisa:nagisa/bump-llvm, r=cuviperbors-0/+0
Include a backport for wrong DWARF information A partial fix for #83139 r? `@cuviper` or `@nikic`
2021-04-17rustdoc: move the cx argument to the end of the listMichael Howell-33/+33
This should help make things consistent.
2021-04-17rustdoc: change 'cx to 'tcx, to match the struct itselfMichael Howell-60/+60
2021-04-17Remove assert that no longer mattersMichael Howell-7/+0
The function `to_src_with_space` doesn't even accept the cache as a parameter, so it doesn't matter any more what's in it.
2021-04-17rustdoc: use more precise relative URLSMichael Howell-577/+613
Instead of using a depth counter and adding "../" to get to the top, this commit makes rustdoc actually compare the path of what it's linking from to the path that it's linking to. This makes the resulting HTML shorter. Here's a comparison of one of the largest (non-source) files in the Rust standard library docs (about 4% improvement before gzipping). $ wc -c struct.Wrapping.old.html struct.Wrapping.new.html 2387389 struct.Wrapping.old.html 2298538 struct.Wrapping.new.html Most if it can be efficiently gzipped away. $ wc -c struct.Wrapping.old.html.gz struct.Wrapping.new.html.gz 70679 struct.Wrapping.old.html.gz 70050 struct.Wrapping.new.html.gz But it also makes a difference in the final DOM size, reducing it from 91MiB to 82MiB.
2021-04-17Auto merge of #84261 - Aaron1011:error-dup-revisions, r=Mark-Simulacrumbors-9/+19
Error when compiletest is passed duplicate revisions Currently, we allow the user to write things like '// revisions: rpass1 rpass1', which will not test what they were intending to test.