Commit Graph

87190 Commits

Author SHA1 Message Date
varkor
1cdf5df451 Fix error message after rebase 2018-11-29 21:00:11 +00:00
varkor
46ef9f820c Fix broken tests 2018-11-29 20:58:38 +00:00
varkor
32a8dec889 Clarify undecided semantics 2018-11-29 20:58:38 +00:00
varkor
d2b340758b Add a test for uninhabitedness changes 2018-11-29 20:58:37 +00:00
varkor
682f0f8d80 Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks 2018-11-29 20:58:37 +00:00
scalexm
1fce415649 Correctly generalize inference variables in nll_relate 2018-11-29 21:57:40 +01:00
scalexm
c805e817a9 Fix doc comments 2018-11-29 21:57:40 +01:00
scalexm
b2b82f790b Implement AggregateOps
`make_solution` does not return any guidance for now
2018-11-29 21:57:40 +01:00
scalexm
0169dc3f36 Implement ResolventOps 2018-11-29 21:57:40 +01:00
scalexm
3b2cfc510b Handle inference variables in nll_relate and use it for chalk 2018-11-29 21:57:34 +01:00
Tom Tromey
fb204cb92f Add template parameter debuginfo to generic types
This changes debuginfo generation to add template parameters to
generic types.  With this change the DWARF now has
DW_TAG_template_type_param for types, not just for functions, like:

 <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type)
    <40e>   DW_AT_name        : (indirect string, offset: 0x375): Generic<i32>
    <412>   DW_AT_byte_size   : 4
    <413>   DW_AT_alignment   : 4
...
 <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param)
    <420>   DW_AT_type        : <0x42a>
    <424>   DW_AT_name        : (indirect string, offset: 0xa65e): T

Closes #9224
2018-11-29 13:04:09 -07:00
David Wood
0124341935
Only consider stem when extension is exe.
This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.
2018-11-29 20:47:59 +01:00
bors
3e90a12a8a Auto merge of #49878 - dlrobertson:va_list_pt0, r=eddyb
libcore: Add VaList and variadic arg handling intrinsics

## Summary

 - Add intrinsics for `va_start`, `va_end`, `va_copy`, and `va_arg`.
 - Add `core::va_list::VaList` to `libcore`.

Part 1 of (at least) 3 for #44930

Comments and critiques are very much welcomed 😄
2018-11-29 19:28:21 +00:00
bjorn3
d108a913c7 Move get_static from CodegenCx to Builder 2018-11-29 18:19:44 +01:00
bjorn3
ceb29e2ac4 Use implicit deref instead of BuilderMethods::cx() 2018-11-29 18:19:44 +01:00
bjorn3
e45733048e Require Deref to CodegenCx for HasCodegen 2018-11-29 18:19:44 +01:00
bjorn3
f47505e867 Rename static_bitcast to const_bitcast 2018-11-29 18:19:43 +01:00
bjorn3
e8da3c6c32 Remove static_addr_of_mut from cg_ssa 2018-11-29 18:19:43 +01:00
bjorn3
aaca5a38ee Rename StaticMethods::static_ptrcast to ConstMethods::const_ptrcast 2018-11-29 18:19:43 +01:00
bjorn3
59682d3e2a Remove static_bitcast from cg_ssa 2018-11-29 18:19:43 +01:00
bjorn3
b8d55d45ce Remove an unnecessary reference 2018-11-29 18:19:43 +01:00
bjorn3
2d4c96d1b1 Move IntrinsicCallMethods::call_overflow_intrinsics to BuilderMethods::checked_binop 2018-11-29 18:19:42 +01:00
bjorn3
9a9045573f Remove call_lifetime_intrinsic from cg_ssa 2018-11-29 18:19:42 +01:00
bjorn3
187c4cf257 Use BackendTypes instead of Backend or HasCodegen in a few places 2018-11-29 18:19:42 +01:00
bjorn3
66c3195c4c Rustfmt on cg_ssa/traits 2018-11-29 18:19:42 +01:00
bjorn3
15a5009af0 Don't use llvm intrinsic names in cg_ssa 2018-11-29 18:19:41 +01:00
bjorn3
8698f5c43d Remove __build_diagnostic_array! from cg_utils 2018-11-29 18:19:41 +01:00
bjorn3
2d46ee26fb Remove static_replace_all_uses and statics_to_rauw from cg_ssa 2018-11-29 18:19:41 +01:00
bjorn3
436eff5e84 Make ConstMethods and StaticMethods require BackendTypes instead of Backend 2018-11-29 18:19:41 +01:00
bjorn3
b3b6e4dd9b Some refactorings 2018-11-29 18:19:41 +01:00
bors
3dde9e1322 Auto merge of #56298 - tromey:update-and-reenable-lldb, r=alexcrichton
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-29 15:24:20 +00:00
John Kåre Alsaker
e955dbca99 Use raw_entry for more efficient interning 2018-11-29 15:56:45 +01:00
Corey Farwell
2a91bbac5d Rename conversion util; remove duplicate util in librustc_codegen_llvm. 2018-11-29 08:09:28 -05:00
bors
0c1dc62c1e Auto merge of #56340 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 22 pull requests

Successful merges:

 - #55391 (bootstrap: clean up a few clippy findings)
 - #56021 (avoid features_untracked)
 - #56023 (atomic::Ordering: Get rid of misleading parts of intro)
 - #56080 (Reduce the amount of bold text at doc.rlo)
 - #56114 (Enclose type in backticks for "non-exhaustive patterns" error)
 - #56124 (Fix small doc mistake on std::io::read::read_to_end)
 - #56127 (Update an outdated comment in mir building)
 - #56148 (Add rustc-guide as a submodule)
 - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer)
 - #56220 (Suggest appropriate place for lifetime when declared after type arguments)
 - #56223 (Make JSON output from -Zprofile-json valid)
 - #56236 (Remove unsafe `unsafe` inner function.)
 - #56255 (Update outdated code comments in StringReader)
 - #56257 (rustc-guide has moved to rust-lang/)
 - #56273 (Add missing doc link)
 - #56289 (Fix small typo in comment of thread::stack_size)
 - #56294 (Fix a typo in the documentation of std::ffi)
 - #56312 (Deduplicate literal -> constant lowering)
 - #56319 (fix futures creating aliasing mutable and shared ref)
 - #56321 (rustdoc: add bottom margin spacing to nested lists)
 - #56322 (resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`)
 - #56330 (Clean up span in non-trailing `..` suggestion)

Failed merges:

r? @ghost
2018-11-29 12:23:05 +00:00
Guillaume Gomez
3b64f86beb
Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavis
Clean up span in non-trailing `..` suggestion
2018-11-29 13:10:54 +01:00
Guillaume Gomez
1fe2085441
Rollup merge of #56322 - petrochenkov:edlints, r=eddyb
resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`

Fixes https://github.com/rust-lang/rust/issues/56311 (stable-to-beta regression)
2018-11-29 13:10:53 +01:00
Guillaume Gomez
f20a1d7b5d
Rollup merge of #56321 - jnqnfe:css_nested_list_margin, r=GuillaumeGomez
rustdoc: add bottom margin spacing to nested lists

the current CSS for nested lists sets margin-bottom to zero, which means that a nested list is squished up against subsequent list items/paragraphs

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

before:
![before](https://user-images.githubusercontent.com/33935229/49176291-699ba800-f342-11e8-9d33-c4acd4df2beb.png)
after:
![after](https://user-images.githubusercontent.com/33935229/49176299-6f918900-f342-11e8-90c3-aa14db195b45.png)
2018-11-29 13:10:52 +01:00
Guillaume Gomez
79f02e4b33
Rollup merge of #56319 - RalfJung:async-mutable-ref, r=cramertj
fix futures creating aliasing mutable and shared ref

Fixes the problem described in https://github.com/solson/miri/issues/532#issuecomment-442552764: `set_task_waker` takes a shared reference and puts a copy into the TLS (in a `NonNull`), but `get_task_waker` gets it back out as a mutable reference. That violates "mutable references must not alias anything"!
2018-11-29 13:10:50 +01:00
Guillaume Gomez
9a5725c77a
Rollup merge of #56312 - oli-obk:const_eval_literal, r=eddyb
Deduplicate literal -> constant lowering
2018-11-29 13:10:49 +01:00
Guillaume Gomez
ad6434ecad
Rollup merge of #56294 - polyfloyd:fix-typo-ffi-doc, r=sfackler
Fix a typo in the documentation of std::ffi
2018-11-29 13:10:48 +01:00
Guillaume Gomez
e3635f2298
Rollup merge of #56289 - marius:patch-1, r=cramertj
Fix small typo in comment of thread::stack_size
2018-11-29 13:10:46 +01:00
Guillaume Gomez
87fa7dc69a
Rollup merge of #56273 - GuillaumeGomez:iterator-fnmut-missing-link, r=steveklabnik
Add missing doc link

r? @steveklabnik
2018-11-29 13:10:45 +01:00
Guillaume Gomez
2d3236c68f
Rollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakis
rustc-guide has moved to rust-lang/

r? @nikomatsakis
2018-11-29 13:10:44 +01:00
Guillaume Gomez
d1b0681bd7
Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoerister
Update outdated code comments in StringReader

For the detection of newlines in the lexer, this is now done in `analyze_source_file.rs`.
2018-11-29 13:10:43 +01:00
Guillaume Gomez
1b7da84e9d
Rollup merge of #56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=cramertj
Remove unsafe `unsafe` inner function.

Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.
2018-11-29 13:10:41 +01:00
Guillaume Gomez
5bc98a731d
Rollup merge of #56223 - Mark-Simulacrum:self-profile-json, r=wesleywiser
Make JSON output from -Zprofile-json valid

r? @wesleywiser

cc https://github.com/rust-lang-nursery/rustc-perf/issues/299
2018-11-29 13:10:40 +01:00
Guillaume Gomez
796892e0ef
Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakis
Suggest appropriate place for lifetime when declared after type arguments
2018-11-29 13:10:39 +01:00
Guillaume Gomez
40ec109888
Rollup merge of #56149 - ariasuni:improve-amctime-doc, r=TimNN
Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer

I was confused by this API so I clarified what they are doing.

I was wondering if I should try to unify more documentation and examples between `unix` and `linux` (e.g. “of the file” is used in `unix` to refer to the file these metadata is for, “of this file” in `linux`, “of the underlying file” in `std::fs::File`).
2018-11-29 13:10:38 +01:00
Guillaume Gomez
143193be6d
Rollup merge of #56148 - mark-i-m:rustc-guide-submodule, r=nikomatsakis
Add rustc-guide as a submodule

Adding this as a submodule will allow two things:
- Linking to the guide from doc.rlo
- Doing a link check as part of the rust CI build

Key question: Do we want to wait for the book to be filled out more? e.g. do we ever want to move it out of the nursery?

r? @nikomatsakis

cc @steveklabnik
2018-11-29 13:10:36 +01:00
Guillaume Gomez
c23e4ea8dc
Rollup merge of #56127 - rust-lang:oli-obk-patch-1, r=nikomatsakis
Update an outdated comment in mir building

r? @eddyb
2018-11-29 13:10:35 +01:00