Commit Graph

74703 Commits

Author SHA1 Message Date
boats
cf6e2f53ba
Add nonstandard_style alias for bad_style. 2018-02-20 13:28:51 -08:00
Guillaume Gomez
5cbf9aedb8 Fix rustdoc test ICE 2018-02-20 20:30:29 +01:00
John Kåre Alsaker
9d3719bcfa Do not run the default panic hook inside procedural macros. Fixes #47812 2018-02-20 19:16:49 +01:00
Mark Simulacrum
33f5ceee1f stage0 cfg cleanup 2018-02-20 08:52:33 -07:00
Mark Simulacrum
24b485b918 Bootstrap from the 1.25 beta 2018-02-20 08:52:33 -07:00
Esteban Küber
1aad320974 When encountering invalid token after unsafe, mention { 2018-02-19 21:58:36 -08:00
Aaron Hill
44d07df1cc
Sort synthetic impls bounds before rendering
This removes the implicit dependency on the iteration
order of FxHashMap
2018-02-19 20:27:28 -05:00
Eduard-Mihai Burtescu
c9fcedeb4c rustc_mir: optimize the deaggregator's expansion of statements. 2018-02-20 02:50:26 +02:00
Eduard-Mihai Burtescu
d773d95880 rustc_mir: don't run the deaggregator on arrays for now. 2018-02-20 02:50:26 +02:00
Eduard-Mihai Burtescu
6195ad8654 test: use the right amount of CGUs in sepcomp-cci-copies to ensure deterministic splitting. 2018-02-20 02:50:26 +02:00
Eduard-Mihai Burtescu
6e5dacbd5e rustc_mir: always run the deaggregator. 2018-02-20 02:50:26 +02:00
Eduard-Mihai Burtescu
e598bdfaa0 rustc_mir: do not remove dead user variables if debuginfo needs them. 2018-02-20 02:50:26 +02:00
Eduard-Mihai Burtescu
b88180f74c rustc_mir: handle all aggregate kinds in the deaggregator. 2018-02-20 02:50:26 +02:00
Eduard-Mihai Burtescu
3922dd72fe rustc_mir: use the "idiomatic" optimization gating in the deaggregator. 2018-02-20 02:50:26 +02:00
Gil Cottle
3f931515df
Fix count usize link typo in docs 2018-02-19 20:51:48 +00:00
Andreas Streichardt
f0a968eada Add missing link 2018-02-19 17:19:30 +01:00
Michael Woerister
89b3ef3e8e Allow for instantiating statics from upstream crates. 2018-02-19 16:49:20 +01:00
Michael Woerister
1be7f966e0 Rename is_translated_fn query to is_translated_item and make it support statics. 2018-02-19 16:47:59 +01:00
Michael Woerister
8ff633cc3b Implement describe_def query for LOCAL_CRATE 2018-02-19 16:46:40 +01:00
Jakub Adam Wieczorek
56512971e0 Update .mailmap with my real name 2018-02-19 13:21:47 +00:00
Michael Woerister
15ff0adcde Use DefId instead of NodeId in MonoItem::Static. 2018-02-19 13:29:22 +01:00
Michael Woerister
d5ed655a08 Use DefId instead of NodeId while generating debuginfo for statics. 2018-02-19 12:41:10 +01:00
Manish Goregaokar
5fdc10c68b Filter out non-macros in resolve_macro
Fixes https://github.com/rust-lang/rust/issues/48341
2018-02-18 17:57:06 -08:00
Manish Goregaokar
a04c124078 Add test 2018-02-18 17:57:06 -08:00
Manish Goregaokar
1d0ae9f174 Generate shortcut links 2018-02-18 17:57:06 -08:00
Manish Goregaokar
f60aeec5d5 Include shortcut links in markdown_links 2018-02-18 17:57:06 -08:00
Manish Goregaokar
6818551c6f bump pulldown 2018-02-18 17:57:06 -08:00
Aaron Hill
87881799a2
Fix submodule ref 2018-02-18 19:40:13 -05:00
Aaron Hill
2aead598c8
Remove extra space in test 2018-02-18 16:29:26 -05:00
Aaron Hill
0c6ad46bcb
Don't generate auto trait impls for type aliases 2018-02-18 16:29:25 -05:00
Aaron Hill
298d703506
Remove extra whitespace 2018-02-18 16:29:25 -05:00
Aaron Hill
64a1f6fbfd
Fix inlining 2018-02-18 16:29:25 -05:00
Aaron Hill
94fd4f360b
More formatting fixups 2018-02-18 16:29:25 -05:00
Aaron Hill
0bfbe24fd9
More formatting fixes 2018-02-18 16:29:25 -05:00
Aaron Hill
1531fbe9be
Cleanup formatting 2018-02-18 16:29:25 -05:00
Aaron Hill
9d7165fcb1
Fix merge conflicts 2018-02-18 16:29:24 -05:00
Aaron Hill
6728f21d85
Generate documentation for auto-trait impls
A new section is added to both both struct and trait doc pages.

On struct/enum pages, a new 'Auto Trait Implementations' section displays any
synthetic implementations for auto traits. Currently, this is only done
for Send and Sync.

On trait pages, a new 'Auto Implementors' section displays all types
which automatically implement the trait. Effectively, this is a list of
all public types in the standard library.

Synthesized impls for a particular auto trait ('synthetic impls') take
into account generic bounds. For example, a type 'struct Foo<T>(T)' will
have 'impl<T> Send for Foo<T> where T: Send' generated for it.

Manual implementations of auto traits are also taken into account. If we have
the following types:

'struct Foo<T>(T)'
'struct Wrapper<T>(Foo<T>)'
'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes
this sound somehow

Then Wrapper will have the following impl generated:
'impl<T> Send for Wrapper<T>'
reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send'
to hold

Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are
taken into account by synthetic impls

However, if a type can *never* implement a particular auto trait
(e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be
generated (in this case, 'impl<T> !Send for MyStruct<T>')

All of this means that a user should be able to copy-paste a synthetic
impl into their code, without any observable changes in behavior
(assuming the rest of the program remains unchanged).
2018-02-18 16:29:24 -05:00
bors
27a046e933 Auto merge of #48322 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 6 pull requests

- Successful merges: #48194, #48273, #48274, #48275, #48282, #48312
- Failed merges:
2018-02-18 17:50:21 +00:00
Corey Farwell
872c782a55 Mark doc examples w/ extern blocks as ignore.
Fixes https://github.com/rust-lang/rust/issues/48218.
2018-02-18 10:27:45 -05:00
Guillaume Gomez
cc20de3993
Rollup merge of #48312 - frewsxcv:frewsxcv-section-headings, r=QuietMisdreavus
Unify 'Platform-specific behavior' documentation headings.

None
2018-02-18 13:21:03 +01:00
Guillaume Gomez
04256e7b9d
Rollup merge of #48282 - Centril:spelling-fix/iter-repeat-with, r=kennytm
Fix spelling in core::iter::repeat_with: s/not/note

Fixes spelling error in https://github.com/rust-lang/rust/pull/48156#discussion_r168718452.
Tracking issue: https://github.com/rust-lang/rust/issues/48169
2018-02-18 13:21:02 +01:00
Guillaume Gomez
af140ecdbc
Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkor
fix more typos found by codespell.
2018-02-18 13:21:01 +01:00
Guillaume Gomez
b7791b0c7e
Rollup merge of #48274 - GuillaumeGomez:remove-hoedown, r=QuietMisdreavus
Remove hoedown from rustdoc

Finally the time has come!

r? @QuietMisdreavus
2018-02-18 13:20:59 +01:00
Guillaume Gomez
715030fd01
Rollup merge of #48273 - alercah:file-warning, r=joshtriplett
Add a warning to File about mutability.

Fixes #47708.
2018-02-18 13:20:58 +01:00
Guillaume Gomez
8093b20201
Rollup merge of #48194 - GuillaumeGomez:doc-test-command, r=Mark-Simulacrum
Doc test command

r? @Mark-Simulacrum
2018-02-18 13:20:57 +01:00
bors
1ad094d81c Auto merge of #47687 - SimonSapin:panic-impl, r=sfackler
RFC 2070 part 1: PanicInfo and Location API changes

This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html
Tracking issue: https://github.com/rust-lang/rust/issues/44489

* Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`.
* Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`.
* Implement `Display` for `PanicInfo` and `Location`
2018-02-18 06:02:35 +00:00
Michael Lamparski
42df8c56cc unused_unsafe: don't label irrelevant fns 2018-02-17 22:31:14 -05:00
bors
e8f03b9438 Auto merge of #47544 - U007D:master, r=nikomatsakis
Relax termination_trait's error bound

As per [this conversation](https://github.com/withoutboats/failure/issues/130#issuecomment-358572413) with @withoutboats and @bkchr
2018-02-18 03:12:14 +00:00
csmoe
4370a5877c fix tyvar_behind_raw_pointer error code 2018-02-18 11:07:52 +08:00
Corey Farwell
472dcdb4ec Fix broken documentation link. 2018-02-17 20:57:00 -05:00