Commit Graph

125957 Commits

Author SHA1 Message Date
Dylan DPC
8af33add1a
Rollup merge of #75705 - denisvasilik:intra-doc-links-intrinsics, r=jyn514
Move to intra-doc links for /library/core/src/intrinsics.rs

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

Known issues:

* The following f32 and f64 primitive methods cannot be resolved:

    f32/f64::powi
    f32/f64::sqrt
    f32/f64::sin
    f32/f64::cos
    f32/f64::powf
    f32/f64::exp
    f32/f64::exp2
    f32/f64::ln
    f32/f64::log2
    f32/f64::log10
    f32/f64::mul_add
    f32/f64::abs
    f32/f64::copysign
    f32/f64::floor
    f32/f64::ceil
    f32/f64::trunc
    f32/f64::round

* Links from core to std:

    [`std::pointer::*`]
    [`std::process::abort`]
    [`from_raw_parts`]
    [`Vec::append`]

* Links with anchors?

	I provided a separate commit that replaced links with anchors by intra-doc links.
	Here the anchor location information gets lost, so its questionable whether to
	actually replace those links.
2020-08-22 02:14:36 +02:00
Wesley Wiser
98b943e7d8 Add partitioning -Z option to control which partitioning scheme is used 2020-08-21 20:03:30 -04:00
Wesley Wiser
5d501f9cd2 Split partitioning.rs into a module 2020-08-21 20:03:18 -04:00
Wesley Wiser
8dea3088c6 Add a CGU partitioning trait
This will allow us to prototype different partitioning schemes without
adding a lot of extra conditionals everywhere.
2020-08-21 20:02:48 -04:00
Matthias Krüger
69f963963e cargotest: fix clippy warnings
Fixes clippy::redundant_static_lifetimes and clippy::toplevel_ref_arg
I also replaced some .expect("") calls with .unwrap()s since there was no message passed by the .expect() anyway.
2020-08-22 01:50:47 +02:00
LeSeulArtichaut
f3a832f4b4 Use intra-doc-links in std::sync::* 2020-08-22 01:28:26 +02:00
Matthias Krüger
108a3f8a5c bootstrap: fix a couple of clippy lint warnings
clippy::print_literal
clippy::clone_on_copy
clippy::single_char_pattern
clippy::into_iter_on_ref
clippy::match_like_matches_macro
2020-08-22 01:08:04 +02:00
Guillaume Gomez
385a1b2476 Add more links 2020-08-22 00:10:58 +02:00
LeSeulArtichaut
9424ac79b2 Remove links that get imported from the prelude 2020-08-21 23:27:23 +02:00
LeSeulArtichaut
8e009bc4f0 Use intra-doc-links in core::ops::* 2020-08-21 23:19:10 +02:00
Simonas Kazlauskas
215822a32e MIR call terminator represents diverging calls too 2020-08-22 00:11:52 +03:00
amosonn
5aba816672
Update rc.rs 2020-08-21 22:25:09 +02:00
Denis Vasilik
9785fd0882 Use intra-doc links 2020-08-21 21:41:43 +02:00
Denis Vasilik
a45d90ec23 Use intra-doc links 2020-08-21 21:35:52 +02:00
Amanieu d'Antras
4fe4c3b7e3 Add regression test 2020-08-21 19:52:48 +01:00
Dr. Koutheir Attouchi
8ae3384bf7
Added link to Microsoft's documentation of CFG 2020-08-21 14:52:30 -04:00
Dr. Koutheir Attouchi
ec9657aec6
Fixed a typo 2020-08-21 14:47:18 -04:00
Guillaume Gomez
a3b45f3e54 Convert links to intra-doc links format 2020-08-21 20:28:57 +02:00
Jubilee Young
31afacf651 bump tidy to cargo_metadata 0.11
Updates cargo_metadata in tidy's Cargo.toml from 0.9.1 to 0.11
Real version change 0.9.11 -> 0.11.1
https://github.com/oli-obk/cargo_metadata/compare/v0.9.1...v0.11.1
2020-08-21 10:48:24 -07:00
bors
de521cbb30 Auto merge of #75708 - JohnTitor:stay-cool-full-bootstrap-builder, r=pietroalbini
Remove the full-bootstrap builder from CI

Fixes #75198
2020-08-21 17:43:27 +00:00
Amanieu d'Antras
60b7c2aaef More inline asm register name fixups for LLVM
Fixes #75761
2020-08-21 18:42:06 +01:00
LeSeulArtichaut
97072c6b90 Apply suggestions from code review
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-21 19:31:00 +02:00
Denis Vasilik
37b6c249ed Rework imports used solely for docs 2020-08-21 19:19:58 +02:00
Denis Vasilik
0f6d95d1eb Apply auto-formatter 2020-08-21 18:50:09 +02:00
Denis Vasilik
0bccd9809e Incorporate suggestions from review 2020-08-21 18:35:17 +02:00
Guillaume Gomez
7a05f13aed Strenghten tests for missing_doc_code_examples lint 2020-08-21 18:08:19 +02:00
Guillaume Gomez
dadde88eba Unify checks for lint missing_doc_code_examples and --show-coverage 2020-08-21 18:08:19 +02:00
bors
efec7cde93 Auto merge of #75694 - RalfJung:miri-align-to, r=nagisa
enable align_to tests in Miri

With https://github.com/rust-lang/miri/issues/1074 resolved, we can enable these tests in Miri.

I also tweaked the test sized to get reasonable execution times with decent test coverage.
2020-08-21 15:40:48 +00:00
Guillaume Gomez
adeedf5243 Show line even if there is no code examples 2020-08-21 16:43:04 +02:00
Guillaume Gomez
b20b6f8714 Ignore more kind of items for doc examples 2020-08-21 13:51:03 +02:00
Aleksey Kladov
35994db6d3 Minor, remove double nesting of a test module 2020-08-21 13:30:39 +02:00
Tomasz Miąsko
78e094632e Remove wrapper type handling absent raw standard streams
Raw standard streams are always available.  Remove unused wrapper type
that was supposed to be responsible for handling their absence.
2020-08-21 13:17:20 +02:00
Tomasz Miąsko
4a00421ba4 Make raw standard stream constructors const 2020-08-21 13:17:20 +02:00
Tomasz Miąsko
479c23bb49 Remove result type from raw standard streams constructors
Raw standard streams constructors are infallible. Remove unnecessary
result type.
2020-08-21 13:17:20 +02:00
bors
521db88cd9 Auto merge of #75697 - lzutao:mir-dumb-const-prefix, r=oli-obk
Suppress "const" prefix of FnDef constants in MIR dump

I [was asked][1] to suppress the `const` infront of `FnDef`.
I tried to suppress comments for other types, but turned out that `const ()` and `()` is different: https://github.com/rust-lang/rust/pull/75697#discussion_r473892806

[1]: https://github.com/rust-lang/rust/pull/75670#issuecomment-675574333
2020-08-21 11:08:31 +00:00
CohenArthur
e6642e41e0 astconv: Split astconv.rs into its own module with submodules
To separate the astconv.rs file, I split it into its own module with a
subtrait called GenericAstConv. This subtrait handles methods related to
generics, be it types or lifetimes.

typeck: Add bounds module and Bounds struct

bounds: Run fmt, add documentation

generic_astconv: Add subtrait GenericAstConv

Some methods of AstConv deal exclusively with Generics. Therefore, it
makes sense to have them in their own trait. Some other methods from
AstConv might be added to it later

generic_astconv: Add more methods from AstConv

Add check_generic_arg_count_for_call() and check_generic_arg_count()

astconv: Add module for clarity

generic: Rename GenericAstConv -> AstConvGeneric

generic: add more methods to AstConvGeneric

astconv: Remove AstConvGeneric trait, add impl dyn AstConv in other
module

astconv: Add errors module to handle AstConv complaints

fmt: format code in astconv/

astconv: Remove old file

astconv: Fix visibility on GenericArgPosition

astconv: Fix visibility on GenericArgPosition

astconv: Fix function visibility on other originally private functions
2020-08-21 11:42:18 +02:00
bors
32cb8d40eb Auto merge of #75765 - JohnTitor:rollup-lexaoa9, r=JohnTitor
Rollup of 5 pull requests

Successful merges:

 - #75324 (clarify documentation of remove_dir errors)
 - #75532 (Fix RFC-1014 test)
 - #75664 (Update mailmap for mati865)
 - #75727 (Switch to intra-doc links in `core::result`)
 - #75750 (Move to intra doc links for std::thread documentation)

Failed merges:

r? @ghost
2020-08-21 09:00:49 +00:00
Yuki Okushi
2a7f868d7f
Rollup merge of #75750 - poliorcetics:intra-links-std-thread, r=jyn514
Move to intra doc links for std::thread documentation

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514
2020-08-21 17:55:15 +09:00
Yuki Okushi
cccb8892e9
Rollup merge of #75727 - camelid:intra-doc-links-for-core-result, r=jyn514
Switch to intra-doc links in `core::result`

Part of #75080.

@rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
2020-08-21 17:55:14 +09:00
Yuki Okushi
8665b0830a
Rollup merge of #75664 - mati865:mailmap, r=Dylan-DPC
Update mailmap for mati865
2020-08-21 17:55:12 +09:00
Yuki Okushi
87c22f4871
Rollup merge of #75532 - tmiasko:rfc-1014, r=nikomatsakis
Fix RFC-1014 test

Use two printlns when testing that writing to a closed stdout does not
panic. Otherwise the test is ineffective, since the current implementation
silently ignores the error during first println regardless.
2020-08-21 17:55:10 +09:00
Yuki Okushi
f2d25538d4
Rollup merge of #75324 - ericseppanen:master, r=JohnTitor
clarify documentation of remove_dir errors

remove_dir will error if the path doesn't exist or isn't a directory.

It's useful to clarify that this is "remove dir or fail" not "remove dir
if it exists".

I don't think this belongs in the title. "Removes an existing, empty
directory" is strangely worded-- there's no such thing as a non-existing
directory.  Better to just say explicitly it will return an error.
2020-08-21 17:55:08 +09:00
Guillaume Gomez
10a880d20e Improve wording 2020-08-21 09:49:26 +02:00
Dr. Koutheir Attouchi
5673b0e492
Switched ROP link to Desktop layout instead of mobile layout 2020-08-21 03:34:25 -04:00
bors
b51651ae9d Auto merge of #75642 - matklad:lexer-comments, r=petrochenkov
Move doc comment parsing to rustc_lexer

Plain comments are trivia, while doc comments are not, so it feels
like this belongs to the rustc_lexer.

The specific reason to do this is the desire to use rustc_lexer in
rustdoc for syntax highlighting, without duplicating "is this a doc
comment?" logic there.

r? @ghost
2020-08-21 06:05:39 +00:00
bors
ff5e0f1dc8 Auto merge of #74846 - Aaron1011:fix/pat-token-capture, r=petrochenkov
Capture tokens for Pat used in macro_rules! argument

This extends PR #73293 to handle patterns (Pat). Unlike expressions,
patterns do not support custom attributes, so we only need to capture
tokens during macro_rules! argument parsing.
2020-08-21 02:16:35 +00:00
Lzu Tao
c4c017a184 Suppress "const" prefix of FnDef in MIR dump 2020-08-21 00:36:49 +00:00
Tomasz Miąsko
3b995ccc3f Extend normalization in const-eval-query-stack test
Builds with debuginfo have additional information in backtrace.
2020-08-21 00:00:00 +00:00
bors
d9d4d39612 Auto merge of #73565 - matthewjasper:core-min-spec, r=nagisa
Use min_specialization in libcore

Getting `TrustedRandomAccess` to work is the main interesting thing here.

- `get_unchecked` is now an unstable, hidden method on `Iterator`
- The contract for `TrustedRandomAccess` is made clearer in documentation
- Fixed a bug where `Debug` would create aliasing references when using the specialized zip impl
- Added tests for the side effects of `next_back` and `nth`.

closes #68536
2020-08-20 23:05:31 +00:00
Dr. Koutheir Attouchi
6fca004ba9
Another motivation for CFG: return-oriented programming 2020-08-20 18:54:40 -04:00