87128 Commits

Author SHA1 Message Date
bors
147e60c5f8 Auto merge of #56313 - nikic:update-llvm, r=alexcrichton
Update LLVM

In particular this fixes #56265.

r? @alexcrichton
2018-11-29 09:36:19 +00:00
Oliver Scherer
28cc3405a8 r/\t/ / 2018-11-29 10:16:04 +01:00
Oliver Scherer
9c282b44c2 Support arbitrary slice constants for pattern deaggregation 2018-11-29 10:16:04 +01:00
Oliver Scherer
7df1d9f656 Allow constants of byte slice type as patterns 2018-11-29 10:16:03 +01:00
bors
5a03532ea9 Auto merge of #56245 - mark-i-m:stabilize_ques_kleene, r=alexcrichton
Stabilize feature `macro_at_most_once_rep`

a.k.a. `?` Kleene operator 🎉

cc #48075

r? @Centril
2018-11-29 06:44:12 +00:00
Nicholas Nethercote
64cd645d14 Split up pretty_print and print.
`pretty_print` takes a `Token` and `match`es on it. But the particular
`Token` kind is known at each call site, so this commit splits it into
five functions: `pretty_print_eof`, `pretty_print_begin`, etc.

This commit also does likewise with `print`, though there is one
callsite for `print` where the `Token` kind isn't known, so a generic
`print` has to stay (but it now just calls out to the various `print_*`
functions).
2018-11-29 17:14:57 +11:00
Nicholas Nethercote
787959c20d Use Cow in Token::String.
`Printer::word` takes a `&str` and converts it into a `String`, which
causes an allocation. But that allocation is rarely necessary, because
`&str` is almost always a `&'static str` or a `String` that won't be
used again.

This commit changes `Token::String` so it holds a `Cow<'static, str>`
instead of a `String`, which avoids a lot of allocations.
2018-11-29 17:12:18 +11:00
Nicholas Nethercote
deb9195e57 Remove huge_word and zero_word.
They are unused. The commit also adds some blank lines between some
methods.
2018-11-29 17:12:15 +11:00
Nicholas Nethercote
6c80f7c4fc Fix whitespace in pp.rs.
This commit converts some 2-space indents to 4-space indents.
2018-11-29 17:11:59 +11:00
bors
a49316ddc9 Auto merge of #56329 - eddyb:load-operand-overaligned, r=nikomatsakis
rustc_codegen_llvm: don't overalign loads of pair operands.

Counterpart to #56300, but for loads instead of stores.
2018-11-29 02:56:24 +00:00
Aaron Hill
9139374181
Fix Tidy error 2018-11-28 21:39:20 -05:00
Aaron Hill
5045e12bd7
Filter out self-referential projection predicates
If we end up with a projection predicate that equates a type with
itself (e.g. <T as MyType>::Value == <T as MyType>::Value), we can
run into issues if we try to add it to our ParamEnv.
2018-11-28 21:15:06 -05:00
Guillaume Gomez
afe41078ad Add arrow to the crate select box 2018-11-29 01:29:49 +01:00
bors
5f387a6032 Auto merge of #56300 - nikic:issue-56267, r=eddyb
Fix alignment of stores to scalar pair

The alignment for the second element of a scalar pair is not the same as for the first element, make sure it is calculated correctly. This fixes #56267.

r? @eddyb
2018-11-29 00:06:20 +00:00
Esteban Küber
66a2c39290 Clean up span in non-trailing .. suggestion 2018-11-28 16:05:02 -08:00
Eduard-Mihai Burtescu
51cf4e9e91 rustc_codegen_llvm: don't overalign loads of pair operands. 2018-11-29 00:37:38 +02:00
Vadim Petrochenkov
d77edb6458 resolve: Fix false-positives from lint absolute_paths_not_starting_with_crate 2018-11-28 22:57:25 +03:00
Guillaume Gomez
8062c7ae4b Add test for crate filtering 2018-11-28 19:33:33 +01:00
Guillaume Gomez
dd717deccb Add crate filtering 2018-11-28 19:33:33 +01:00
Ralf Jung
46a683111d fix futures aliasing mutable and shared ref 2018-11-28 19:30:11 +01:00
Aaron Hill
1a84d211a2
Check all substitution parameters for inference variables 2018-11-28 12:27:11 -05:00
Aaron Hill
f57247c48c
Ensure that Rusdoc discovers all necessary auto trait bounds
Fixes #50159

This commit makes several improvements to AutoTraitFinder:

* Call infcx.resolve_type_vars_if_possible before processing new
predicates. This ensures that we eliminate inference variables wherever
possible.
* Process all nested obligations we get from a vtable, not just ones
with depth=1.
  * The 'depth=1' check was a hack to work around issues processing
certain predicates. The other changes in this commit allow us to
properly process all predicates that we encounter, so the check is no
longer necessary,
* Ensure that we only display predicates *without* inference variables
to the user, and only attempt to unify predicates that *have* an
inference variable as their type.

Additionally, the internal helper method is_of_param now operates
directly on a type, rather than taking a Substs. This allows us to use
the 'self_ty' method, rather than directly dealing with Substs.
2018-11-28 12:27:11 -05:00
Oliver Scherer
afb8cba5fc Move hir::Lit -> ty::Const conversion into its own file 2018-11-28 17:15:40 +01:00
Georg Semmler
230f5d5676
rustdoc: Fix inlining reexporting bang-macros 2018-11-28 17:11:06 +01:00
Georg Semmler
50b4eefcf5
rustdoc: Fix inlining reexported custom derives 2018-11-28 17:10:21 +01:00
Lyndon Brown
c013de4f9b rustdoc: add margin-bottom spacing to nested lists
set to zero meant that the nested list was squished up against
subsequent list items/paragraphs

this changes the bottom margin to .6em, same as for paragraphs

an example demonstrating the difference with screenshots is given in the
pull request
2018-11-28 16:05:43 +00:00
Nikita Popov
2ec76e76e4 Update LLVM
In particular to pull in a fix for #56265.
2018-11-28 16:13:40 +01:00
Oliver Scherer
40412dc09a Deduplicate literal -> constant lowering 2018-11-28 16:07:30 +01:00
Masaki Hara
8cab350c85 Don't use ReErased in deferred sizedness checking. 2018-11-28 23:59:19 +09:00
Ralf Jung
dd593d3ab8 get_ref -> get_mut 2018-11-28 12:49:11 +01:00
Ralf Jung
965fdb0294 fix build 2018-11-28 10:35:56 +01:00
Ralf Jung
12d90aa949 put the MaybeUninit inside the UnsafeCell 2018-11-28 09:29:56 +01:00
Mark Mansi
5d7717360c fix test 2018-11-27 18:21:10 -06:00
Nikita Popov
d8190afbcb Fix alignment of stores to scalar pair
The alignment for the second element of a scalar pair is not the
same as for the first element. Make sure it is computed correctly
based on the element size.
2018-11-28 00:31:03 +01:00
bors
b68fc18c45 Auto merge of #56293 - matthiaskrgr:clippy, r=oli-obk
submodules: update clippy from 754b4c07 to b2601beb

Changes:
````
Fix NAIVE_BYTECOUNT applicability
Fix dogfood error
Change Applicability of MISTYPED_LITERAL_SUFFIX
Add applicability level to (nearly) every span_lint_and_sugg function
Update stderr file
Fix bugs and improve documentation
Add Applicability::Unspecified to span_lint_and_sugg functions
Introduce snippet_with_applicability and hir_with_applicability functions
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.
constants: add u128 i128 builtin types and fix outdated url
Update lints
Lint only the first statment/expression after alloc
Fix some warnings related to Self
Rename some symbols
Split lint into slow and unsafe vector initalization
Add unsafe set_len initialization
Add slow zero-filled vector initialization lint
Travis: Remove `sudo: false`
Downgrade needless_pass_by_value to allow by default
````
2018-11-27 21:54:39 +00:00
polyfloyd
e63bd91895 Fix a typo in the documentation of std::ffi 2018-11-27 22:33:46 +01:00
Dale Wijnand
097b5db5f6
Move feature enable in ptr::hash doc example 2018-11-27 21:18:20 +00:00
Matthias Krüger
2dd48f834f submodules: update clippy from 754b4c07 to b2601beb
Changes:
````
Fix NAIVE_BYTECOUNT applicability
Fix dogfood error
Change Applicability of MISTYPED_LITERAL_SUFFIX
Add applicability level to (nearly) every span_lint_and_sugg function
Update stderr file
Fix bugs and improve documentation
Add Applicability::Unspecified to span_lint_and_sugg functions
Introduce snippet_with_applicability and hir_with_applicability functions
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.
constants: add u128 i128 builtin types and fix outdated url
Update lints
Lint only the first statment/expression after alloc
Fix some warnings related to Self
Rename some symbols
Split lint into slow and unsafe vector initalization
Add unsafe set_len initialization
Add slow zero-filled vector initialization lint
Travis: Remove `sudo: false`
Downgrade needless_pass_by_value to allow by default
````
2018-11-27 21:21:57 +01:00
Dale Wijnand
9755410f73
Try to fix ptr::hash's doc example 2018-11-27 20:09:21 +00:00
Tom Tromey
999595f640 Re-enable lldb
Commit 7215963e56 disabled lldb due to the LLVM update.  This patch
updates lldb to build against the Rust LLVM, and re-enables it.
2018-11-27 13:07:16 -07:00
Mark Mansi
aeede9eb46 fix test 2018-11-27 13:13:11 -06:00
Mark Mansi
59ae93daed remove uses of feature gate 2018-11-27 13:13:11 -06:00
Mark Mansi
f3b29ca1c2 remove unstable book entry 2018-11-27 13:13:11 -06:00
Mark Mansi
e97edad935 update tests 2018-11-27 13:13:11 -06:00
Mark Mansi
32aafb2203 remove some unused vars 2018-11-27 13:08:41 -06:00
Mark Mansi
a542e48871 remove feature gate 2018-11-27 13:08:41 -06:00
Mark Mansi
c75ed34732 move feature gate to accepted 2018-11-27 13:08:41 -06:00
bors
400c2bc5ed Auto merge of #56264 - petrochenkov:typonly, r=nikomatsakis
resolve: Extern prelude is for type namespace only

Fixes https://github.com/rust-lang/rust/issues/56263 (stable-to-beta regression)
2018-11-27 19:04:44 +00:00
Marius Nuennerich
73b656bbb3
Fix small typo in comment 2018-11-27 18:57:55 +01:00
Dale Wijnand
4a7ffe2646
Fix issue number 2018-11-27 16:46:59 +00:00