Commit graph

142512 commits

Author SHA1 Message Date
Tor Hovland
fca088ae23 Now also displays portability tags. 2021-04-18 10:46:06 +02:00
Tor Hovland
1e2ab998c3 Give import items their own CSS class. 2021-04-18 10:46:06 +02:00
Tor Hovland
41f49aac4e Added a test. 2021-04-18 10:45:52 +02:00
Tor Hovland
0c736e92a3 Add stability tags to ImportItem. 2021-04-18 10:45:22 +02:00
Christiaan Dirkx
024a49aed1 Fix clippy test using ErrorKind 2021-04-18 09:29:24 +02:00
Christiaan Dirkx
5b5afaefff Fix clippy test using ErrorKind 2021-04-18 09:29:24 +02:00
CDirkx
b42e52f2cc Bump to 1.53.0
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2021-04-18 09:29:24 +02:00
Christiaan Dirkx
0895a693bd Fix test metadata_access_times to also check for Unsupported 2021-04-18 09:29:24 +02:00
Christiaan Dirkx
af0dec2795 Rename NotSupported to Unsupported 2021-04-18 09:29:23 +02:00
Christiaan Dirkx
1b5f117c47 Use NotSupported in more places 2021-04-18 09:29:23 +02:00
CDirkx
86592b9939 Bump since to 1.52.0 2021-04-18 09:29:22 +02:00
Christiaan Dirkx
9f589b023f Update decode_error_kind to decode os errors to NotSupported 2021-04-18 09:29:22 +02:00
Christiaan Dirkx
4a15bd8eaf Add and insta-stabilize std::io::ErrorKind::NotSupported 2021-04-18 09:29:22 +02:00
bors
d7c3386414 Auto merge of #84207 - SimonSapin:deprecate-core-raw, r=dtolnay
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-18 07:23:54 +00:00
Anders Kaseorg
6dfd700c59 bootstrap: Restore missing --bulk-dirs for rust-docs, rustc-docs
The --bulk-dirs argument was removed for rust-docs in commit
c768ce1384 and rustc-docs in commit
8ca46fc7a8 (#79788), presumably by
mistake; that slowed down installation of rust-docs from under a
second to some twenty *minutes*.  Restoring --bulk-dirs reverses this
slowdown.

Fixes #80684.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-04-17 23:43:50 -07:00
Michael Howell
18fbd3692f rustdoc: get rid of CURRENT_DEPTH 2021-04-17 23:08:28 -07:00
bors
6765010495 Auto merge of #84065 - c410-f3r:tests-tests-tests, r=petrochenkov
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-18 04:53:18 +00:00
hi-rustin
37b289720d Fix the wrong return value type description of validateResult 2021-04-18 10:43:14 +08:00
bors
8c37e19da4 Auto merge of #84064 - hyd-dev:unknown-lints, r=petrochenkov
Do not ignore path segments in the middle in `#[allow]`/`#[warn]`/`#[deny]`/`#[forbid]` attributes

Fixes #83477.
2021-04-18 02:12:13 +00:00
bors
dc99219d3a Auto merge of #84064 - hyd-dev:unknown-lints, r=petrochenkov
Do not ignore path segments in the middle in `#[allow]`/`#[warn]`/`#[deny]`/`#[forbid]` attributes

Fixes #83477.
2021-04-18 02:12:13 +00:00
Jacob Hoffman-Andrews
e23b035bbe Reduce visual weight of attributes. 2021-04-17 18:08:50 -07:00
bors
83ca4b7e60 Auto merge of #84061 - 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-17 23:31:10 +00:00
Caio
4e6d6abc6a Move some tests to more reasonable directories - 6 2021-04-17 18:53:54 -03:00
bors
392ba2ba1a Auto merge of #84279 - Dylan-DPC:rollup-k7otd7e, r=Dylan-DPC
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-17 20:41:37 +00:00
Simonas Kazlauskas
487e27350a Don't set fast(-math) for certain simd ops
`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-17 23:33:10 +03:00
Dylan DPC
a3277e2a0a
Rollup merge of #84257 - joshtriplett:inaddr-any, r=m-ou-se
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-17 22:31:34 +02:00
Dylan DPC
d919a5a8f8
Rollup merge of #84203 - jyn514:anchor-span, r=euclio
rustdoc: Give a more accurate span for anchor failures

r? `@euclio`
2021-04-17 22:31:33 +02:00
Dylan DPC
b5ce9c44a3
Rollup merge of #84150 - jsha:defer-search-js, r=GuillaumeGomez
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-17 22:31:32 +02:00
Dylan DPC
5dae27a8da
Rollup merge of #83237 - notriddle:short-links, r=jyn514
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-17 22:31:31 +02:00
Joshua Nelson
59546efaa3 rustdoc: Give a more accurate span for anchor failures 2021-04-17 16:03:03 -04:00
Scott McMurray
1864970430 Add the try_trait_v2 library basics
No compiler changes as part of this -- just new unstable traits and impls thereof.

The goal here is to add the things that aren't going to break anything, to keep the feature implementation simpler in the next PR.
2021-04-17 11:58:18 -07:00
bors
bd9949b8e6 Auto merge of #84270 - nagisa:nagisa/bump-llvm, r=cuviper
Include a backport for wrong DWARF information

A partial fix for #83139

r? `@cuviper` or `@nikic`
2021-04-17 18:10:41 +00:00
Michael Howell
755b4fb02b rustdoc: move the cx argument to the end of the list
This should help make things consistent.
2021-04-17 09:55:28 -07:00
Michael Howell
bb0204861b rustdoc: change 'cx to 'tcx, to match the struct itself 2021-04-17 09:55:28 -07:00
Michael Howell
21bf8af873 Remove assert that no longer matters
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-17 09:21:52 -07:00
Michael Howell
6516f9408e rustdoc: use more precise relative URLS
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-17 09:21:52 -07:00
bors
42bee5a404 Auto merge of #84261 - Aaron1011:error-dup-revisions, r=Mark-Simulacrum
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.
2021-04-17 15:29:34 +00:00
bors
cd9b30527e Auto merge of #84260 - Aaron1011:global-alloc-eval-always, r=cjgillot
Mark `has_global_allocator` query as `eval_always`

Fixes #84252

This query reads from untracked global state in `CStore`.
2021-04-17 12:48:50 +00:00
Simonas Kazlauskas
d9fa8be69c Include a backport for wrong DWARF information
A partial fix for #83139
2021-04-17 14:54:38 +03:00
hyd-dev
913780397a Do not ignore path segments in the middle in #[allow]/#[warn]/#[deny]/#[forbid] attributes 2021-04-17 18:11:07 +08:00
hyd-dev
ac044e35aa
Do not ignore path segments in the middle in #[allow]/#[warn]/#[deny]/#[forbid] attributes 2021-04-17 18:11:07 +08:00
bors
03301ef1d8 Auto merge of #84246 - notriddle:rustdoc-path-printing-cleanup, r=jyn514
rustdoc: get rid of unused path printing code

The code for printing a raw path is only used in utils.rs, which only prints the alternative (non-HTML) format. Path has
a function that does the same thing without HTML support, so use that instead.
2021-04-17 09:58:27 +00:00
bors
080d30235f Auto merge of #84244 - ABouttefeux:closure-return-conflict-suggest, r=estebank
fix incomplete diagnostic notes when closure returns conflicting for genric type

fixes #84128
Correctly report the span on for conflicting return type in closures
2021-04-17 07:17:31 +00:00
bors
57e28ef86f Auto merge of #84243 - Soveu:fix-derive-macro-const-default, r=petrochenkov
Builtin derive macros: fix error with const generics default

This fixes a bug where builtin derive macros (like Clone, Debug) would basically copy-paste the default from a const generic, causing a compile error with very confusing message - it would say defaults are not allowed in impl blocks, while pointing at struct/enum/union definition.
2021-04-17 04:48:36 +00:00
bors
42e5621c53 Auto merge of #84113 - SNCPlay42:suggestion-extern-crate, r=petrochenkov
Detect when suggested paths enter extern crates more rigorously

When reporting resolution errors, the compiler tries to avoid suggesting importing inaccessible paths from other crates. However, the search for suggestions only recognized when it was entering a crate root directly, and so failed to recognize a path like `crate::module::private_item`, where `module` was imported from another crate with `use other_crate::module`, as entering another crate.

Fixes #80079
Fixes #84081
2021-04-17 02:23:10 +00:00
bors
84e93979e1 Auto merge of #84074 - notriddle:rustdoc-macro-visibility, r=jyn514
rustdoc: clean up and test macro visibility print

This fixes the overly-complex invariant mentioned in <https://github.com/rust-lang/rust/pull/83237#issuecomment-815346570>, where the macro source can't have any links in it only because the cache hasn't been populated yet.
2021-04-16 23:41:43 +00:00
JP Sugarbroad
8b5faf4ab0 Switch transmute_ptr_to_ptr to "pedantic" class.
Per discussion in https://github.com/rust-lang/rust-clippy/issues/6372, this lint has significant false positives.
2021-04-16 14:29:23 -07:00
bors
e441b33ba0 Auto merge of #7099 - ABouttefeux:master, r=llogiq
add type in help message of from_over_into

fixes #7088
changelog: add type in help message of from_over_into
2021-04-16 21:22:24 +00:00
Aaron Hill
4cfc7b3f73
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.
2021-04-16 17:05:59 -04:00
Aaron Hill
169a221618
Mark has_global_allocator query as eval_always
Fixes #84252

This query reads from untracked global state in `CStore`.
2021-04-16 16:28:54 -04:00