Commit Graph

125928 Commits

Author SHA1 Message Date
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
LeSeulArtichaut
1ababd8794 Use intra-doc-links in alloc 2020-08-21 00:25:25 +02:00
bors
e15510ca33 Auto merge of #75494 - matthewjasper:defer-recursive-projection-error, r=nikomatsakis
Don't immediately error for cycles during normalization

#73452 meant some normalization cycles could be detected earlier, breaking some code.
This PR makes defers errors for normalization cycles to fulfillment, fixing said code.

Fixes #74868

r? @nikomatsakis
2020-08-20 20:27:22 +00:00
Alexis Bourget
fb3f927131 Move to intra doc links for std::thread documentation 2020-08-20 22:03:00 +02:00
Camelid
5a307cf4bb
Fix intra-doc links
One of the original links was linking to the wrong thing as well.

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-20 12:39:12 -07:00
Guillaume Gomez
5e9cc4e319 fmt 2020-08-20 21:28:06 +02:00
Guillaume Gomez
d108bd5386 Add documentation for --show-coverage option 2020-08-20 21:26:57 +02:00
Guillaume Gomez
9c254c18d6 Update how doc examples are counted 2020-08-20 21:26:57 +02:00
Guillaume Gomez
631c80659d Remove "total" columns in --show-coverage output 2020-08-20 21:09:40 +02:00
Matthew Jasper
67fb5839df Don't immediately error for cycles during normalization 2020-08-20 19:29:42 +01:00
bors
3323691109 Auto merge of #75747 - cuviper:rollup-icke90l, r=cuviper
Rollup of 8 pull requests

Successful merges:

 - #75672 (Move to intra-doc links for task.rs and vec.rs)
 - #75702 (Clean up E0759 explanation)
 - #75703 (Enable stack-overflow detection on musl for non-main threads)
 - #75710 (Fix bad printing of const-eval queries)
 - #75716 (Upgrade Emscripten on CI to 1.39.20 )
 - #75731 (Suppress ty::Float in MIR comments of ty::Const)
 - #75733 (Remove duplicated alloc vec bench push_all_move)
 - #75743 (Rename rustc_lexer::TokenKind::Not to Bang)

Failed merges:

r? @ghost
2020-08-20 18:02:46 +00:00
Josh Stone
2a3f43de42
Rollup merge of #75743 - matklad:excl, r=davidtwco
Rename rustc_lexer::TokenKind::Not to Bang

All other tokens are named by the punctuation they use, rather than
by semantics operation they stand for. `!` is the only exception to
the rule, let's fix it.
2020-08-20 10:07:34 -07:00
Josh Stone
6ac1523b23
Rollup merge of #75733 - pickfire:patch-3, r=matklad
Remove duplicated alloc vec bench push_all_move

push_all_move is the same as extend
2020-08-20 10:07:32 -07:00
Josh Stone
16b9b9017a
Rollup merge of #75731 - lzutao:mir-cmts-suppress-float-ty-const, r=oli-obk
Suppress ty::Float in MIR comments of ty::Const

Already covered by MIR constant comments
2020-08-20 10:07:30 -07:00
Josh Stone
02b2f73fc5
Rollup merge of #75716 - tlively:upgrade-emscripten-1.39.20, r=cuviper
Upgrade Emscripten on CI to 1.39.20

This Emscripten version was the first to be cut after the LLVM 11
release branch was created, so it should be the most compatible with
LLVM 11. The old version we were using was incompatible with LLVM 11
because its wasm-ld did not understand all the relocations that LLVM
11 emits.
2020-08-20 10:07:28 -07:00
Josh Stone
6a3425eb08
Rollup merge of #75710 - ThibsG:FixBadPrinting75447, r=oli-obk
Fix bad printing of const-eval queries

Fixes: #75447

r? @RalfJung

cc @oli-obk
2020-08-20 10:07:27 -07:00
Josh Stone
7ac126ec56
Rollup merge of #75703 - tmiasko:stack-overflow-musl, r=cuviper
Enable stack-overflow detection on musl for non-main threads
2020-08-20 10:07:24 -07:00
Josh Stone
ba104d291a
Rollup merge of #75702 - GuillaumeGomez:cleanup-e0759, r=pickfire
Clean up E0759 explanation

r? @Dylan-DPC

cc @pickfire
2020-08-20 10:07:22 -07:00
Josh Stone
f29f21285e
Rollup merge of #75672 - kofls:intradoc-fix, r=jyn514
Move to intra-doc links for task.rs and vec.rs

Partial fix for #75080

links for [`get`], [`get_mut`] skipped due to #75643
link for [`copy_from_slice`] skipped due to #63351
2020-08-20 10:07:19 -07:00
Joshua Nelson
f5d7848458
Remove duplicate binding in match
Co-authored-by: lzutao <taolzu@gmail.com>
2020-08-20 12:15:17 -04:00
Lzu Tao
d97bbd3a21 Suppress ty::Float in MIR comments of ty::Const
Already covered by MIR constant comments
2020-08-20 16:03:09 +00:00
Guillaume Gomez
6fb7e02a36 Update rustdoc coverage UI test 2020-08-20 17:42:17 +02:00
Guillaume Gomez
3307ba8212 Ignore code examples on given items where it doesn't make sense 2020-08-20 17:41:36 +02:00
bors
814d252417 Auto merge of #75562 - oli-obk:const_prop_no_aggregates, r=wesleywiser
Check that we don't use `Rvalue::Aggregate` after the deaggregator

fixes #75481

r? @wesleywiser

cc @RalfJung (modified the validator)
2020-08-20 15:39:06 +00:00
Joshua Nelson
d468a81a8a Remove duplication in fold_item 2020-08-20 11:19:11 -04:00
Oliver Scherer
dcc202723a
Apply suggestions from code review
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
2020-08-20 16:56:19 +02:00
Aleksey Kladov
52992979c5 Rename rustc_lexer::TokenKind::Not to Bang
All other tokens are named by the punctuation they use, rather than
by semantics operation they stand for. `!` is the only exception to
the rule, let's fix it.
2020-08-20 16:55:19 +02:00
Guillaume Gomez
7f55c83487 Apply review comments 2020-08-20 15:25:35 +02:00
bors
5fff3824bc Auto merge of #75670 - lzutao:suppress-mir-fndef-ty, r=oli-obk
Suppress MIR comments of FnDef and unit types

An expansion of #75566.
Comments of FnDef MIR constant already contain `ty::Contains` comments.
2020-08-20 12:42:13 +00:00
Ivan Tham
4f2e182c5f
Liballoc bench rename push_all extend_from_slice 2020-08-20 19:04:52 +08:00