]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoAuto merge of #46583 - scottmcm:fix-static-i128-lower, r=eddyb
bors [Wed, 20 Dec 2017 17:34:17 +0000 (17:34 +0000)]
Auto merge of #46583 - scottmcm:fix-static-i128-lower, r=eddyb

Fix -Z lower_128bit_ops handling of statics

Avoids ICEs such as the following:
>  error: internal compiler error: src\librustc_metadata\cstore_impl.rs:131:
>  get_optimized_mir: missing MIR for `DefId(8/0:40 ~
>  compiler_builtins[9532]::int[0]::addsub[0]::rust_i128_addo[0])`

r? @nagisa

cc #45676 @est31

6 years agoAuto merge of #46874 - kennytm:rollup, r=kennytm
bors [Wed, 20 Dec 2017 14:47:21 +0000 (14:47 +0000)]
Auto merge of #46874 - kennytm:rollup, r=kennytm

Rollup of 14 pull requests

- Successful merges: #46359, #46517, #46671, #46751, #46760, #46787, #46794, #46828, #46831, #46835, #46851, #46852, #46856, #46870
- Failed merges:

6 years agoRollup merge of #46870 - ffflorian:fix/slice/typo, r=rkruppe
kennytm [Wed, 20 Dec 2017 13:22:05 +0000 (21:22 +0800)]
Rollup merge of #46870 - ffflorian:fix/slice/typo, r=rkruppe

docs(slice): Clarification in binary_search_by

This PR ~fixes a small comment typo~ adds some clarification to a half-open interval in the `binary_search_by` function in `slice`.

6 years agoRollup merge of #46856 - estebank:missing-in-impl-def-span, r=arielb1
kennytm [Wed, 20 Dec 2017 13:22:04 +0000 (21:22 +0800)]
Rollup merge of #46856 - estebank:missing-in-impl-def-span, r=arielb1

Point at def span in "missing in impl" error

6 years agoRollup merge of #46852 - scottmcm:asm-placecontext, r=arielb1
kennytm [Wed, 20 Dec 2017 13:22:03 +0000 (21:22 +0800)]
Rollup merge of #46852 - scottmcm:asm-placecontext, r=arielb1

Split PlaceContext::Store into Store & AsmOutput

Outputs in InlineAsm can be read-write, so splitting it out is useful for things like Store-Store folding, as that's unsound for a Store-AsmOutput.

This PR is intended to make no changes, just be the mechanical split of the enum.  Future changes can use the split, like a MIR pass I'm working on and perhaps two-phase borrows (see this FIXME: https://github.com/rust-lang/rust/pull/46852/files#diff-74dcd7740ab2104cd2b9a3b68dd4f208R543)

6 years agoRollup merge of #46851 - petrochenkov:tospace, r=estebank
kennytm [Wed, 20 Dec 2017 13:22:02 +0000 (21:22 +0800)]
Rollup merge of #46851 - petrochenkov:tospace, r=estebank

Fix whitespacing issues in pretty-printing of bounds

cc https://github.com/rust-lang/rust/pull/46827#discussion_r157603277

6 years agoRollup merge of #46835 - topecongiro:bad-span-for-macro-invocation-in-type, r=petroch...
kennytm [Wed, 20 Dec 2017 13:22:00 +0000 (21:22 +0800)]
Rollup merge of #46835 - topecongiro:bad-span-for-macro-invocation-in-type, r=petrochenkov

Remove a token after closing delimiter from the span of macro in type position

e.g.
```rust
let x = y: foo!();
```
The span for `foo!()` includes `;`.

cc https://github.com/rust-lang-nursery/rustfmt/issues/2290.

6 years agoRollup merge of #46831 - Diggsey:float-debug-fmt, r=dtolnay
kennytm [Wed, 20 Dec 2017 13:21:59 +0000 (21:21 +0800)]
Rollup merge of #46831 - Diggsey:float-debug-fmt, r=dtolnay

Always `Debug` floats with a decimal point

Fixes #30967

r? @dtolnay

6 years agoRollup merge of #46828 - vi:hash_for_systemtime_instant, r=dtolnay
kennytm [Wed, 20 Dec 2017 13:21:58 +0000 (21:21 +0800)]
Rollup merge of #46828 - vi:hash_for_systemtime_instant, r=dtolnay

Add Hash impl for SystemTime and Instant

Closes #46670.

Not sure how to actually test non-Linux platforms.
`rustc --target=i686-pc-windows-gnu --crate-name std --crate-type rlib src/libstd/lib.rs -o q.rlib` works a bit, but for Redox I'm not sure what to do.

r? @dtolnay

6 years agoRollup merge of #46794 - Sh4rK:distribute-intrinsic-natvis, r=estebank
kennytm [Wed, 20 Dec 2017 13:21:57 +0000 (21:21 +0800)]
Rollup merge of #46794 - Sh4rK:distribute-intrinsic-natvis, r=estebank

Distribute intrinsic.natvis with the compiler for windows-msvc.

This adds `intrinsic.natvis` to the `windows-msvc` distributions of Rust, enabling the visualization of `str` and slices in the VS debugger. Two other natvis files are already included, this was probably just an oversight.

I also updated `rust-windbg.cmd` to load this file as well.

6 years agoRollup merge of #46787 - varkor:contrib-6, r=QuietMisdreavus
kennytm [Wed, 20 Dec 2017 13:21:56 +0000 (21:21 +0800)]
Rollup merge of #46787 - varkor:contrib-6, r=QuietMisdreavus

Add an option to allow rustdoc to list modules by appearance

The `--sort-modules-by-appearance` option will list modules in the
order that they appear in the source, rather than sorting them
alphabetically (as is the default). This resolves #8552.

6 years agoRollup merge of #46760 - semarie:openbsd-arm64, r=alexcrichton
kennytm [Wed, 20 Dec 2017 13:21:55 +0000 (21:21 +0800)]
Rollup merge of #46760 - semarie:openbsd-arm64, r=alexcrichton

add aarch64-unknown-openbsd support

- make liblibc to point to libc with aarch64-unknown-openbsd
- make c_char (in std::os::raw) to point to right value

r? @alexcrichton

currently, I have only tested in crosscompilation environement (openbsd x64_64 -> openbsd aarch64). it produces valid binaries.

6 years agoRollup merge of #46751 - michaelwoerister:c-incremental, r=alexcrichton
kennytm [Wed, 20 Dec 2017 13:21:54 +0000 (21:21 +0800)]
Rollup merge of #46751 - michaelwoerister:c-incremental, r=alexcrichton

incr.comp.: Add `-C incremental` in addition to `-Z incremental`

This PR adds a stable commandline option for invoking incremental compilation.

r? @alexcrichton

6 years agoRollup merge of #46671 - varkor:contrib-2, r=KodrAus
kennytm [Wed, 20 Dec 2017 13:21:53 +0000 (21:21 +0800)]
Rollup merge of #46671 - varkor:contrib-2, r=KodrAus

Reject superfluous `::` in IPv6 addresses

Fixes #46263.

6 years agoRollup merge of #46517 - notriddle:patch-2, r=BurntSushi
kennytm [Wed, 20 Dec 2017 13:21:51 +0000 (21:21 +0800)]
Rollup merge of #46517 - notriddle:patch-2, r=BurntSushi

Stablize RefCell::{replace, swap}

RefCell::replace_with is not stablized in this PR, since it wasn't part of the RFC.

CC #43570

6 years agoRollup merge of #46359 - GuillaumeGomez:remove-dead-linkage, r=QuietMisdreavus
kennytm [Wed, 20 Dec 2017 13:21:50 +0000 (21:21 +0800)]
Rollup merge of #46359 - GuillaumeGomez:remove-dead-linkage, r=QuietMisdreavus

Do not display hidden types, fixes issue 23912

Fixes #23912.

r? @QuietMisdreavus

(It's the one I was talking about a few days ago, just close it if it's useless.)

6 years agoAuto merge of #46457 - m4b:no_mangle_static, r=michaelwoerister
bors [Wed, 20 Dec 2017 12:03:25 +0000 (12:03 +0000)]
Auto merge of #46457 - m4b:no_mangle_static, r=michaelwoerister

Don't set the linkage_name for static variables

For `no_mangle` statics:

1. Linkage_name no longer set
2. The static variable also no longer has a dwarf namespace scope

This matches C++ output, which does not set the linkage_name and is not scoped:

e.g. c++:

```
0x000000b6:   DW_TAG_base_type [8]
                DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000077] = "long int")
                DW_AT_encoding [DW_FORM_data1]  (DW_ATE_signed)
                DW_AT_byte_size [DW_FORM_data1] (0x08)

0x000000bd:   DW_TAG_variable [9]
                DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000053] = "TEST")
                DW_AT_type [DW_FORM_ref4]       (cu + 0x0048 => {0x00000048})
                DW_AT_external [DW_FORM_flag_present]   (true)
                DW_AT_decl_file [DW_FORM_data1] ("/home/m4b/tmp/bad_debug/test.cpp")
                DW_AT_decl_line [DW_FORM_data1] (14)
                DW_AT_location [DW_FORM_exprloc]        (<0x9> 03 40 10 20 00 00 00 00 00 )

0x000000d2:   DW_TAG_namespace [2] *
                DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000009d] = "std")

```

and (now) Rust:

```
0x0000002a:   DW_TAG_variable [2]
                DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000046] = "TEST")
                DW_AT_type [DW_FORM_ref4]       (cu + 0x0045 => {0x00000045})
                DW_AT_external [DW_FORM_flag_present]   (true)
                DW_AT_decl_file [DW_FORM_data1] ("/tmp/test.rs")
                DW_AT_decl_line [DW_FORM_data1] (8)
                DW_AT_alignment [DW_FORM_udata] (1)
                DW_AT_location [DW_FORM_exprloc]        (<0x9> 03 c0 4d 06 00 00 00 00 00 )

0x00000040:   DW_TAG_namespace [3] *
                DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000004b] = "test")
```

6 years agodocs(slice): Clarify half-open interval
Florian Keller [Wed, 20 Dec 2017 10:43:49 +0000 (11:43 +0100)]
docs(slice): Clarify half-open interval

6 years agoAuto merge of #46508 - clarcharr:duration_extras, r=sfackler
bors [Wed, 20 Dec 2017 09:13:56 +0000 (09:13 +0000)]
Auto merge of #46508 - clarcharr:duration_extras, r=sfackler

Add more Duration methods for consistency.

Follow-up to #46507.

6 years agoAuto merge of #46233 - SimonSapin:fmt-debuglist-flags, r=sfackler
bors [Wed, 20 Dec 2017 06:38:15 +0000 (06:38 +0000)]
Auto merge of #46233 - SimonSapin:fmt-debuglist-flags, r=sfackler

Make fmt::DebugList and friends forward formatting parameters

For example, formatting slice of integers with `{:04?}` should zero-pad each integer.

This also affects every use of `#[derive(Debug)]`.

6 years agodwarf: do not set linkage_name for no mangle statics, and do not have a scope. ref...
m4b [Wed, 20 Dec 2017 05:18:24 +0000 (21:18 -0800)]
dwarf: do not set linkage_name for no mangle statics, and do not have a scope. ref #33172

6 years agoAuto merge of #46733 - nikomatsakis:nll-master-to-rust-master-5, r=arielb1
bors [Wed, 20 Dec 2017 03:58:15 +0000 (03:58 +0000)]
Auto merge of #46733 - nikomatsakis:nll-master-to-rust-master-5, r=arielb1

nll part 5

Next round of changes from the nll-master branch.

Extensions:

- we now propagate ty-region-outlives constraints out of closures and into their creator when necessary
- we fix a few ICEs that can occur by doing liveness analysis (and the resulting normalization) during type-checking
- we handle the implicit region bound that assumes that each type `T` outlives the fn body
- we handle normalization of inputs/outputs in fn signatures

Not included in this PR (will come next):

- handling `impl Trait`
- tracking causal information
- extended errors

r? @arielb1

6 years agoAuto merge of #46441 - gaurikholkar:single_lifetimes, r=nikomatsakis
bors [Wed, 20 Dec 2017 01:18:17 +0000 (01:18 +0000)]
Auto merge of #46441 - gaurikholkar:single_lifetimes, r=nikomatsakis

 Lint against single-use lifetime names

This is a fix for #44752

TO-DO

- [x] change lint message
- [x] add ui tests

r? @nikomatsakis

6 years agoPoint at def span in "missing in impl" error
Esteban Küber [Tue, 19 Dec 2017 22:41:03 +0000 (14:41 -0800)]
Point at def span in "missing in impl" error

6 years agoSplit PlaceContext::Store into Store & AsmOutput
Scott McMurray [Tue, 19 Dec 2017 22:05:14 +0000 (17:05 -0500)]
Split PlaceContext::Store into Store & AsmOutput

Outputs in InlineAsm can be read-write, so splitting it out is useful for things like Store-Store folding, as it cannot be done for a Store-AsmOutput.

This PR is intended to make no changes, just be the mechanical split of the enum.  Future changes can use the split, like a MIR pass I'm working on and perhaps two-phase borrows.

6 years agoFix whitespacing issues in pretty-printing of bounds
Vadim Petrochenkov [Tue, 19 Dec 2017 20:40:17 +0000 (23:40 +0300)]
Fix whitespacing issues in pretty-printing of bounds

6 years agoFix -Z lower_128bit_ops handling of statics
Scott McMurray [Fri, 8 Dec 2017 11:00:05 +0000 (03:00 -0800)]
Fix -Z lower_128bit_ops handling of statics

Avoids ICEs such as the following:
 error: internal compiler error: src\librustc_metadata\cstore_impl.rs:131:
 get_optimized_mir: missing MIR for `DefId(8/0:40 ~
 compiler_builtins[9532]::int[0]::addsub[0]::rust_i128_addo[0])`

6 years agoadding lint for single use lifetime names
Niko Matsakis [Thu, 23 Nov 2017 13:05:58 +0000 (08:05 -0500)]
adding lint for single use lifetime names

6 years agoFix up an ui test
Seiichi Uchida [Tue, 19 Dec 2017 16:21:40 +0000 (01:21 +0900)]
Fix up an ui test

6 years agoRemove a token after closing delimiter from the span of macro in type position
topecongiro [Tue, 19 Dec 2017 08:54:39 +0000 (17:54 +0900)]
Remove a token after closing delimiter from the span of macro in type position

6 years agoAuto merge of #46749 - SimonSapin:exorcism, r=nikomatsakis
bors [Tue, 19 Dec 2017 10:50:15 +0000 (10:50 +0000)]
Auto merge of #46749 - SimonSapin:exorcism, r=nikomatsakis

Move PhantomData<T> from Shared<T> to users of both Shared and #[may_dangle]

After discussing https://github.com/rust-lang/rust/issues/27730#issuecomment-316432083 today with @pnkfelix and @Gankro, we concluded that it’s ok for drop checking not to be much smarter than the current `#[may_dangle]` design which requires an explicit unsafe opt-in.

6 years agobe specific about what kind of normalization we mean
Niko Matsakis [Tue, 19 Dec 2017 09:28:45 +0000 (04:28 -0500)]
be specific about what kind of normalization we mean

6 years agoremove dead `is_foo_free_region` helpers
Niko Matsakis [Tue, 19 Dec 2017 09:26:56 +0000 (04:26 -0500)]
remove dead `is_foo_free_region` helpers

Only `is_local_free_region` is used.

6 years agofix comment on `check_type_tests`
Niko Matsakis [Tue, 19 Dec 2017 09:21:57 +0000 (04:21 -0500)]
fix comment on `check_type_tests`

6 years agotweak comment on `TypeTest` to be more accurate
Niko Matsakis [Tue, 19 Dec 2017 09:18:15 +0000 (04:18 -0500)]
tweak comment on `TypeTest` to be more accurate

6 years agoAuto merge of #46664 - mikeyhew:raw_pointer_self, r=arielb1
bors [Tue, 19 Dec 2017 07:05:05 +0000 (07:05 +0000)]
Auto merge of #46664 - mikeyhew:raw_pointer_self, r=arielb1

arbitrary_self_types: add support for raw pointer `self` types

This adds support for raw pointer `self` types, under the `arbitrary_self_types` feature flag. Types like `self: *const Self`, `self: *const Rc<Self>`, `self: Rc<*const Self` are all supported. Object safety checks are updated to allow`self: *const Self` and `self: *mut Self`.

This PR does not add support for `*const self` and `*mut self` syntax. That can be added in a later PR once this code is reviewed and merged.

#44874

r? @arielb1

6 years agoAuto merge of #46829 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Tue, 19 Dec 2017 04:21:05 +0000 (04:21 +0000)]
Auto merge of #46829 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 11 pull requests

- Successful merges: #46700, #46786, #46790, #46800, #46801, #46802, #46804, #46805, #46812, #46824, #46825
- Failed merges:

6 years agoAlways print floats with a decimal point with the Debug formatter
Diggory Blake [Mon, 18 Dec 2017 23:16:00 +0000 (23:16 +0000)]
Always print floats with a decimal point with the Debug formatter

6 years agoAuto merge of #45525 - MaikKlein:collector, r=eddyb
bors [Tue, 19 Dec 2017 01:34:50 +0000 (01:34 +0000)]
Auto merge of #45525 - MaikKlein:collector, r=eddyb

Move collector to librustc_mir::monomorphize

cc https://github.com/rust-lang/rust/issues/44334 and https://github.com/rust-lang/rust/issues/45276

* I moved the collector to rustc_mir

*  I renamed `TransItem` to `MonoItem`. _(I still need to fix up comments and variable names)_

* I got rid of `common.rs` and `monomorphize.rs` from `librustc_trans_utils`. I moved most of the functionality into `TyCtxt`. I realized that the `librustc_trans_utils::common.rs` was just copy pasted from `librustc_trans::common.rs`.

Should I also get rid of the `librustc_trans::common.rs` in this PR? Most of the functionality seems a bit useless, I decided to put some of it into `TyCtxt` but maybe that is not the correct action here.

Should I also get rid of `librustc_trans_utils` completely here? Or should I do it in a separate PR?

6 years agoAdd a test for `--sort-modules-by-appearance`
varkor [Tue, 19 Dec 2017 01:05:06 +0000 (01:05 +0000)]
Add a test for `--sort-modules-by-appearance`

6 years agoRollup merge of #46825 - GuillaumeGomez:mobile-search, r=QuietMisdreavus
Guillaume Gomez [Mon, 18 Dec 2017 22:08:41 +0000 (23:08 +0100)]
Rollup merge of #46825 - GuillaumeGomez:mobile-search, r=QuietMisdreavus

Improve search display on mobile

r? @QuietMisdreavus

6 years agoRollup merge of #46824 - GuillaumeGomez:doc-sidebar, r=QuietMisdreavus
Guillaume Gomez [Mon, 18 Dec 2017 22:08:40 +0000 (23:08 +0100)]
Rollup merge of #46824 - GuillaumeGomez:doc-sidebar, r=QuietMisdreavus

Fix dynamic crates listing in doc sidebar

Fixes #46687.

r? @QuietMisdreavus

6 years agoRollup merge of #46812 - kennytm:fix-align-offset-sign, r=petrochenkov
Guillaume Gomez [Mon, 18 Dec 2017 22:08:39 +0000 (23:08 +0100)]
Rollup merge of #46812 - kennytm:fix-align-offset-sign, r=petrochenkov

Fix the wrong subtraction in align_offset intrinsic.

Given how the stage0 implementation in #43903 is written, as well as that in the RFC, I suppose the current implementation has a typo.

cc #44488, cc @oli-obk.

6 years agoRollup merge of #46805 - estebank:unnecessary-unsafe-spans, r=arielb1
Guillaume Gomez [Mon, 18 Dec 2017 22:08:38 +0000 (23:08 +0100)]
Rollup merge of #46805 - estebank:unnecessary-unsafe-spans, r=arielb1

Tweak "unecessary unsafe block" error spans

6 years agoRollup merge of #46804 - estebank:conflicting-impl-def-span, r=arielb1
Guillaume Gomez [Mon, 18 Dec 2017 22:08:37 +0000 (23:08 +0100)]
Rollup merge of #46804 - estebank:conflicting-impl-def-span, r=arielb1

Use def span for conflicting impls and recursive fn

6 years agoRollup merge of #46802 - estebank:redefined-def-span, r=michaelwoerister
Guillaume Gomez [Mon, 18 Dec 2017 22:08:35 +0000 (23:08 +0100)]
Rollup merge of #46802 - estebank:redefined-def-span, r=michaelwoerister

Point at def span on redefined name diagnostic

6 years agoRollup merge of #46801 - estebank:impl-extra-req-def-span, r=arielb1
Guillaume Gomez [Mon, 18 Dec 2017 22:08:34 +0000 (23:08 +0100)]
Rollup merge of #46801 - estebank:impl-extra-req-def-span, r=arielb1

Point at def span in "impl has stricter requirements" diagnostic

6 years agoRollup merge of #46800 - estebank:expected-closure-def-span, r=arielb1
Guillaume Gomez [Mon, 18 Dec 2017 22:08:33 +0000 (23:08 +0100)]
Rollup merge of #46800 - estebank:expected-closure-def-span, r=arielb1

Rework expected closure error

* point at def span
* add label to primary span
* use `span_label`s instead of `span_note`s

6 years agoRollup merge of #46790 - frewsxcv:frewsxcv-swap-bytes, r=QuietMisdreavus
Guillaume Gomez [Mon, 18 Dec 2017 22:08:32 +0000 (23:08 +0100)]
Rollup merge of #46790 - frewsxcv:frewsxcv-swap-bytes, r=QuietMisdreavus

Display binary notation for numeric swap_bytes methods.

This better illustrates what's happening to the bits behind the scenes.

6 years agoRollup merge of #46786 - GuillaumeGomez:fix-sized-rendering, r=QuietMisdreavus
Guillaume Gomez [Mon, 18 Dec 2017 22:08:31 +0000 (23:08 +0100)]
Rollup merge of #46786 - GuillaumeGomez:fix-sized-rendering, r=QuietMisdreavus

Fix ?Sized where bound not being displayed at the correct place

Fixes #46726.

r? @QuietMisdreavus

6 years agoRollup merge of #46700 - GuillaumeGomez:more-relevant-doc-search, r=QuietMisdreavus
Guillaume Gomez [Mon, 18 Dec 2017 22:08:30 +0000 (23:08 +0100)]
Rollup merge of #46700 - GuillaumeGomez:more-relevant-doc-search, r=QuietMisdreavus

make doc search more relevant

Fixes #46595.

r? @QuietMisdreavus

If possible, I'd appreciate a strong check on this PR. :3

6 years agoAdd tests for hidden types
Guillaume Gomez [Sun, 26 Nov 2017 22:24:49 +0000 (23:24 +0100)]
Add tests for hidden types

6 years agoAdd Hash impl for SystemTime and Instant
Vitaly _Vi Shukela [Mon, 18 Dec 2017 21:35:43 +0000 (00:35 +0300)]
Add Hash impl for SystemTime and Instant

Closes #46670.

6 years agoImprove search display on mobile
Guillaume Gomez [Mon, 18 Dec 2017 20:27:19 +0000 (21:27 +0100)]
Improve search display on mobile

6 years agoAuto merge of #46808 - eddyb:issue-46769-quick, r=arielb1
bors [Mon, 18 Dec 2017 20:44:18 +0000 (20:44 +0000)]
Auto merge of #46808 - eddyb:issue-46769-quick, r=arielb1

rustc: ensure optimized enums have a properly aligned size.

Fixes #46769 by padding the optimized enums wrapping packed data as necessary.

Note that this is not the only way to solve this - on nightly, #46436 makes it easier to fix without adding new padding because of the replacement of `packed` flags with a non-redundant scheme.
But because it can't be backported, the optimal fix will be in a separate nightly-only PR (#46809).

6 years agoFix dynamic crates listing in doc sidebar
Guillaume Gomez [Mon, 18 Dec 2017 20:15:46 +0000 (21:15 +0100)]
Fix dynamic crates listing in doc sidebar

6 years agoFix tidy issue
varkor [Mon, 18 Dec 2017 19:52:45 +0000 (19:52 +0000)]
Fix tidy issue

6 years agorustc: ensure optimized enums have a properly aligned size.
Eduard-Mihai Burtescu [Mon, 18 Dec 2017 13:06:34 +0000 (15:06 +0200)]
rustc: ensure optimized enums have a properly aligned size.

6 years agoTweak "unecessary unsafe block" error spans
Esteban Küber [Mon, 18 Dec 2017 07:48:59 +0000 (23:48 -0800)]
Tweak "unecessary unsafe block" error spans

6 years agoAdd rustc_data_structures for trans_utils/lib.rs
Maik Klein [Mon, 18 Dec 2017 15:59:26 +0000 (16:59 +0100)]
Add rustc_data_structures for trans_utils/lib.rs

6 years agoFix incorrect rebase in collector::find_vtable_types
Maik Klein [Mon, 18 Dec 2017 15:14:00 +0000 (16:14 +0100)]
Fix incorrect rebase in collector::find_vtable_types

6 years agoRework expected closure error
Esteban Küber [Mon, 18 Dec 2017 06:22:24 +0000 (22:22 -0800)]
Rework expected closure error

* point at def span
* add label to primary span
* use `span_label`s instead of `span_note`s

6 years agoPoint at def span in "impl has stricter requirements" diagnostic
Esteban Küber [Mon, 18 Dec 2017 06:33:56 +0000 (22:33 -0800)]
Point at def span in "impl has stricter requirements" diagnostic

6 years agoAuto merge of #46811 - michaelwoerister:depkind-is-input, r=nikomatsakis
bors [Mon, 18 Dec 2017 16:48:37 +0000 (16:48 +0000)]
Auto merge of #46811 - michaelwoerister:depkind-is-input, r=nikomatsakis

incr.comp.: Mark DepKind node as input.

Fixes `euclid` on https://travis-ci.org/rust-icci.

r? @nikomatsakis

6 years agonormalize the results of `tcx.type_of` after substituting
Ariel Ben-Yehuda [Sun, 17 Dec 2017 01:48:39 +0000 (19:48 -0600)]
normalize the results of `tcx.type_of` after substituting

Also remove `def_ty`, which was a footgun because it did not do the
above.

6 years agoUpdate lockfile
Maik Klein [Thu, 14 Dec 2017 20:04:28 +0000 (21:04 +0100)]
Update lockfile

6 years agoRename more functions from trans to monomorphize
Maik Klein [Tue, 5 Dec 2017 23:29:36 +0000 (00:29 +0100)]
Rename more functions from trans to monomorphize

6 years agoRename trans to monomorphize in comments
Maik Klein [Fri, 1 Dec 2017 18:57:45 +0000 (19:57 +0100)]
Rename trans to monomorphize in comments

6 years agoMove partitioning.rs to rustc_mir
Maik Klein [Thu, 23 Nov 2017 15:02:02 +0000 (16:02 +0100)]
Move partitioning.rs to rustc_mir

6 years agoPrefer type_of().substs over instance::ty()
Maik Klein [Thu, 23 Nov 2017 14:06:18 +0000 (15:06 +0100)]
Prefer type_of().substs over instance::ty()

6 years agoMove has_metadata back to context.rs
Maik Klein [Thu, 23 Nov 2017 14:05:55 +0000 (15:05 +0100)]
Move has_metadata back to context.rs

6 years agoRemove branch with has_metadata
Maik Klein [Thu, 23 Nov 2017 10:04:31 +0000 (11:04 +0100)]
Remove branch with has_metadata

6 years agoTest with trans_apply_param_substs
Maik Klein [Thu, 23 Nov 2017 09:20:55 +0000 (10:20 +0100)]
Test with trans_apply_param_substs

6 years agoRemove duplicated functions from trans::common.rs
Maik Klein [Mon, 30 Oct 2017 07:36:03 +0000 (08:36 +0100)]
Remove duplicated functions from trans::common.rs

6 years agoMove meta_data into TyS
Maik Klein [Sun, 29 Oct 2017 21:37:38 +0000 (22:37 +0100)]
Move meta_data into TyS

6 years agoMove instance related methods from TyCtxt to Instance
Maik Klein [Fri, 27 Oct 2017 09:27:05 +0000 (11:27 +0200)]
Move instance related methods from TyCtxt to Instance

6 years agoFix some comments to refer to `MonoItem`
Maik Klein [Fri, 27 Oct 2017 08:55:31 +0000 (10:55 +0200)]
Fix some comments to refer to `MonoItem`

6 years agoRefactor paths to middle::trans to mir::mono
Maik Klein [Fri, 27 Oct 2017 08:50:39 +0000 (10:50 +0200)]
Refactor paths to middle::trans to mir::mono

6 years agoMove middle::trans.rs to mir::mono.rs
Maik Klein [Fri, 27 Oct 2017 08:34:42 +0000 (10:34 +0200)]
Move middle::trans.rs to mir::mono.rs

6 years agoRename mono_item.rs to item.rs
Maik Klein [Thu, 26 Oct 2017 08:35:47 +0000 (10:35 +0200)]
Rename mono_item.rs to item.rs

6 years agoRename as_trans_item to as_mono_item
Maik Klein [Thu, 26 Oct 2017 08:32:39 +0000 (10:32 +0200)]
Rename as_trans_item to as_mono_item

6 years agoRename more functions from trans to mono
Maik Klein [Thu, 26 Oct 2017 08:14:21 +0000 (10:14 +0200)]
Rename more functions from trans to mono

6 years agoRename TransItemExt to MonoItemExt
Maik Klein [Wed, 25 Oct 2017 15:50:23 +0000 (17:50 +0200)]
Rename TransItemExt to MonoItemExt

6 years agoMove common.rs functionality into TyCtxt
Maik Klein [Wed, 25 Oct 2017 15:27:27 +0000 (17:27 +0200)]
Move common.rs functionality into TyCtxt

6 years agoRename TransItemCollectionMode to MonoItemCollectionMode
Maik Klein [Wed, 25 Oct 2017 15:05:19 +0000 (17:05 +0200)]
Rename TransItemCollectionMode to MonoItemCollectionMode

6 years agoRename TransItem to MonoItem
Maik Klein [Wed, 25 Oct 2017 15:04:24 +0000 (17:04 +0200)]
Rename TransItem to MonoItem

6 years agoMove trans_item and monomorphize to rustc_mir
Maik Klein [Wed, 25 Oct 2017 14:14:51 +0000 (16:14 +0200)]
Move trans_item and monomorphize to rustc_mir

6 years agoMove collector to monomorphize
Maik Klein [Wed, 25 Oct 2017 13:39:54 +0000 (15:39 +0200)]
Move collector to monomorphize

6 years agoFix the wrong subtraction in align_offset intrinsic.
kennytm [Mon, 18 Dec 2017 14:52:24 +0000 (22:52 +0800)]
Fix the wrong subtraction in align_offset intrinsic.

6 years agoincr.comp.: Mark DepKind node as input.
Michael Woerister [Mon, 18 Dec 2017 14:20:19 +0000 (15:20 +0100)]
incr.comp.: Mark DepKind node as input.

6 years agoincr.comp.: Add -Cincremental in addition to -Zincremental
Michael Woerister [Fri, 15 Dec 2017 20:03:48 +0000 (14:03 -0600)]
incr.comp.: Add -Cincremental in addition to -Zincremental

6 years agoFix ?Sized where bound not being displayed at the correct place
Guillaume Gomez [Sun, 17 Dec 2017 13:08:09 +0000 (14:08 +0100)]
Fix ?Sized where bound not being displayed at the correct place

6 years agoUse def span for conflicting impls and recursive fn
Esteban Küber [Mon, 18 Dec 2017 07:46:55 +0000 (23:46 -0800)]
Use def span for conflicting impls and recursive fn

6 years agoPoint at def span on redefined name diagnostic
Esteban Küber [Mon, 18 Dec 2017 06:44:32 +0000 (22:44 -0800)]
Point at def span on redefined name diagnostic

6 years agoAuto merge of #46798 - Diggsey:debug-osstr, r=dtolnay
bors [Mon, 18 Dec 2017 02:54:11 +0000 (02:54 +0000)]
Auto merge of #46798 - Diggsey:debug-osstr, r=dtolnay

Add lossless debug implementation for unix OsStrs

Fixes #22766

Invalid utf8 byte sequences are replaced with `\xFF` style escape codes, while valid utf8 goes through the normal `Debug` implementation.

This is necessarily different from the windows Debug implementation, which uses `\u{xxxx}` style escape sequences for unpaired surrogates, but both implementations are consistent in that they are both lossless, and display invalid sequences in the way most similar to existing language syntax.

r? @dtolnay

6 years agoAdd lossless debug implementation for unix OsStrs
Diggory Blake [Mon, 18 Dec 2017 00:13:10 +0000 (00:13 +0000)]
Add lossless debug implementation for unix OsStrs

6 years agoDistribute intrinsic.natvis with the compiler for windows-msvc.
Antal Szabó [Sun, 17 Dec 2017 22:23:10 +0000 (23:23 +0100)]
Distribute intrinsic.natvis with the compiler for windows-msvc.

6 years agoDisplay binary notation for numeric swap_bytes methods.
Corey Farwell [Sun, 17 Dec 2017 21:02:11 +0000 (16:02 -0500)]
Display binary notation for numeric swap_bytes methods.

This better illustrates what's happening to the bits behind the scenes.

6 years agoAuto merge of #46788 - petrochenkov:assocrecov, r=estebank
bors [Sun, 17 Dec 2017 21:00:27 +0000 (21:00 +0000)]
Auto merge of #46788 - petrochenkov:assocrecov, r=estebank

syntax: recovery for incorrect associated item paths like `[T; N]::clone`

cc https://github.com/rust-lang/rust/pull/44970
Fixes https://github.com/rust-lang/rust/issues/42187
r? @estebank

6 years agoadd aarch64-unknown-openbsd support
Sébastien Marie [Thu, 14 Dec 2017 09:25:14 +0000 (10:25 +0100)]
add aarch64-unknown-openbsd support

- make liblibc to point to libc with aarch64-unknown-openbsd
- make c_char (in std::os::raw) to point to right value