]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoDocument heap allocation location guarantee
Aidan Hobson Sayers [Sun, 20 Mar 2016 23:12:20 +0000 (23:12 +0000)]
Document heap allocation location guarantee

8 years agoAuto merge of #32010 - devonhollowood:non-c-like-enum-repr, r=Aatch
bors [Sun, 20 Mar 2016 19:49:46 +0000 (12:49 -0700)]
Auto merge of #32010 - devonhollowood:non-c-like-enum-repr, r=Aatch

Add tests for #26114

First step in fixing #26114

8 years agoAuto merge of #32375 - phil-opp:patch-1, r=japaric
bors [Sun, 20 Mar 2016 17:30:38 +0000 (10:30 -0700)]
Auto merge of #32375 - phil-opp:patch-1, r=japaric

docs: The `data-layout` field is no longer required in custom targets

The `data-layout` field is no longer required. It was made optional in 958d5638254958ea42652de7444b63f2e67e7fe3.

The `os` field is always required.

Related to #31367

8 years agoThe `data-layout` field is no longer required, but the `os` field is
Philipp Oppermann [Sun, 20 Mar 2016 15:51:46 +0000 (16:51 +0100)]
The `data-layout` field is no longer required, but the `os` field is

The `data-layout` field  was made optional in 958d5638254958ea42652de7444b63f2e67e7fe3. The `os` field is always required.

8 years agoAuto merge of #32367 - tiehuis:tiehuis-E0412-help, r=nagisa
bors [Sun, 20 Mar 2016 11:18:13 +0000 (04:18 -0700)]
Auto merge of #32367 - tiehuis:tiehuis-E0412-help, r=nagisa

Alter E0412 help message wording

The initial wording does not make sense due to an extra 'to'.

There are two potential candidates we can change this to:
 - 'you can import it into scope'
 - 'to import it into scope'

In keeping the changes minimal, we choose the first, as this is more in line with the grammar of the extended candidates help message.

8 years agoAuto merge of #32361 - japaric:no-llvm-assertions-on-arm, r=alexcrichton
bors [Sun, 20 Mar 2016 06:58:20 +0000 (23:58 -0700)]
Auto merge of #32361 - japaric:no-llvm-assertions-on-arm, r=alexcrichton

disable llvm assertions on ARM compilers

workaround for #32360

r? @alexcrichton

8 years agoUpdate tests which reference E0421
tiehuis [Sun, 20 Mar 2016 06:18:32 +0000 (19:18 +1300)]
Update tests which reference E0421

8 years agoAuto merge of #32358 - Manishearth:pr-32053, r=Manishearth
bors [Sun, 20 Mar 2016 04:15:23 +0000 (21:15 -0700)]
Auto merge of #32358 - Manishearth:pr-32053, r=Manishearth

Add note if method is called on a function object

rebase of #32053

8 years agoAlter E0412 help message wording
tiehuis [Sun, 20 Mar 2016 03:02:31 +0000 (16:02 +1300)]
Alter E0412 help message wording

The initial wording does not make sense due to an extra 'to'.

There are two potential candidates we can change this to:
 - 'you can import it into scope'
 - 'to import it into scope'

In keeping the changes minimal, we choose the first, as this is more in line with the grammar of the extended candidates help message.

8 years agoAuto merge of #32306 - nikomatsakis:issue-32278, r=eddyb
bors [Sun, 20 Mar 2016 01:39:50 +0000 (18:39 -0700)]
Auto merge of #32306 - nikomatsakis:issue-32278, r=eddyb

create fewer region variables in coercions

Fixes #32278.

r? @eddyb

8 years agoAuto merge of #32362 - bluss:float-fast-math, r=eddyb
bors [Sat, 19 Mar 2016 22:41:42 +0000 (15:41 -0700)]
Auto merge of #32362 - bluss:float-fast-math, r=eddyb

Fix floating point fast-math intrinsics

The implementation did not handle the case where both operands were constants, which caused an llvm assertion:

```
rustc: //buildslave//rust-buildbot//slave//nightly-dist-rustc-musl-linux//build//src//llvm//include/llvm/Support/Casting.h:237:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::Instruction; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::Instruction*]:
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
```

8 years agoUpdate float_math test to not use constants
Ulrik Sverdrup [Sat, 19 Mar 2016 21:23:45 +0000 (22:23 +0100)]
Update float_math test to not use constants

8 years agoFix LLVMRustSetHasUnsafeAlgebra to only have effect on instructions
Ulrik Sverdrup [Sat, 19 Mar 2016 21:02:33 +0000 (22:02 +0100)]
Fix LLVMRustSetHasUnsafeAlgebra to only have effect on instructions

8 years agodisable llvm assertions on ARM compilers
Jorge Aparicio [Sat, 19 Mar 2016 19:59:51 +0000 (14:59 -0500)]
disable llvm assertions on ARM compilers

workaround for #32360

8 years agoAuto merge of #32244 - Amanieu:compare_exchange_result, r=alexcrichton
bors [Sat, 19 Mar 2016 19:25:34 +0000 (12:25 -0700)]
Auto merge of #32244 - Amanieu:compare_exchange_result, r=alexcrichton

Change compare_exchange to return a Result<T, T>

As per the discussion in #31767

I also changed the feature name from `extended_compare_and_swap` to `compare_exchange`.

r? @alexcrichton

8 years agoAuto merge of #32314 - alexcrichton:ascii-fun, r=aturon
bors [Sat, 19 Mar 2016 16:39:26 +0000 (09:39 -0700)]
Auto merge of #32314 - alexcrichton:ascii-fun, r=aturon

std: Revert addition of `into_ascii_*` methods

The addition of these methods in #31335 required adding impls of the trait for
the `String` and `Vec<T>` types. This unfortunately caused a regression (#32074)
in type inference for using these methods which the libs team has decided to not
push forward with. These methods were stabilized in #32020 which was intended to
get backported to beta, but the backport hasn't happened just yet. This commit
reverts both the addition and stabilization of these methods.

One proposed method of handling this, in #32076, was to move the methods to an
extra trait to avoid conflicts with type inference. After some discussion,
however, the libs team concluded that we probably want to reevaluate what we're
doing here, so discussion will continue on the tracking issue, #27809.

Closes #32074

8 years agoAdd Help and Suggestion to issue-29124 tests
Daniel J Rollins [Sun, 6 Mar 2016 15:47:05 +0000 (15:47 +0000)]
Add Help and Suggestion to issue-29124 tests

8 years agoUse last path segment for uncalled method note if span_to_segment fails
Daniel J Rollins [Sat, 5 Mar 2016 19:50:34 +0000 (19:50 +0000)]
Use last path segment for uncalled method note if span_to_segment fails

PR: #32053

8 years agoAdd test for issue 29124
Daniel J Rollins [Sat, 5 Mar 2016 18:34:17 +0000 (18:34 +0000)]
Add test for issue 29124

8 years agoFix code review actions in PR #32053
Daniel J Rollins [Sat, 5 Mar 2016 17:17:36 +0000 (17:17 +0000)]
Fix code review actions in PR #32053

Split `fileline_note` into a `file_line note` and `span_suggestion` as per
@Manishearth's suggestions.

Change nested `match`es to `if let`s.

8 years agoAdd note if method is called on a function object
Daniel J Rollins [Sat, 5 Mar 2016 00:26:45 +0000 (00:26 +0000)]
Add note if method is called on a function object

Fixes issue #29124.

If method is called on a function type a note is generated to suggest
that the developer may have forgotten to call it.

e.g.

fn main() {
    let mut guess = String::new();
    std::io::stdin.read_line(&mut guess);
}

will generate the note:

note: called method on function type. did you mean `std::io::stdin().read_line(..)`?

8 years agoChange compare_exchange to return a Result<T, T>
Amanieu d'Antras [Mon, 14 Mar 2016 10:57:50 +0000 (11:57 +0100)]
Change compare_exchange to return a Result<T, T>

8 years agoAuto merge of #32351 - eddyb:rollup, r=eddyb
bors [Sat, 19 Mar 2016 11:42:02 +0000 (04:42 -0700)]
Auto merge of #32351 - eddyb:rollup, r=eddyb

Rollup of 14 pull requests

- Successful merges: #32265, #32269, #32271, #32288, #32308, #32316, #32319, #32321, #32327, #32329, #32332, #32337, #32342, #32347
- Failed merges:

8 years agoRollup merge of #32347 - Amanieu:volatile_fat_ptr, r=eddyb
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:02 +0000 (12:30 +0200)]
Rollup merge of #32347 - Amanieu:volatile_fat_ptr, r=eddyb

Fix volatile stores of fat pointers

This was previously causing an LLVM assertion.

r? @eddyb

8 years agoRollup merge of #32342 - petevine:patch-1, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:02 +0000 (12:30 +0200)]
Rollup merge of #32342 - petevine:patch-1, r=alexcrichton

Use explicit -march flags in the i586 mk file

`-march` should definitely go last, after the environment `$C(XX)FLAGS`, or it's going to remain brittle.

This should fix cross-compilation issues on x86_64 (possibly x86 too on some newer distros) - it was far too assuming of me to expect you really had to want i586 using your own flags.

8 years agoRollup merge of #32337 - dotdash:llvm-aa-perf, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:02 +0000 (12:30 +0200)]
Rollup merge of #32337 - dotdash:llvm-aa-perf, r=alexcrichton

Update LLVM to include a backport to restore AA performance

cc #31435
r? @alexcrichton

8 years agoRollup merge of #32332 - jonas-schievink:issue32323, r=arielb1
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
Rollup merge of #32332 - jonas-schievink:issue32323, r=arielb1

liveness: substitute bound regions with free ones before normalizing the return type

Fixes #32323

r? @arielb1

8 years agoRollup merge of #32329 - sfackler:assert-recover-safe-pub, r=aturon
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
Rollup merge of #32329 - sfackler:assert-recover-safe-pub, r=aturon

Make AssertRecoverSafe's field public

It's basically the very definition of a newtype, so we might as well
make things easy on people and let them construct and access it
directly.

r? @aturon

8 years agoRollup merge of #32327 - toddlucas:master, r=apasel422
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
Rollup merge of #32327 - toddlucas:master, r=apasel422

Minor phrasing adjustment to book references-and-borrowing

8 years agoRollup merge of #32321 - alexcrichton:cross-to-netbsd, r=japaric
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
Rollup merge of #32321 - alexcrichton:cross-to-netbsd, r=japaric

rustbuild: Fix cross to netbsd from Linux

Apparently the NetBSD compiler-rt builds into the linux directory as well.
I'm... detecting a trend!

8 years agoRollup merge of #32319 - benaryorg:patch-3, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
Rollup merge of #32319 - benaryorg:patch-3, r=alexcrichton

documentation fix in RELEASES.md

f32 should probably be denoted as 0.0 as it might improve readability.

8 years agoRollup merge of #32316 - tclfs:patch-3, r=steveklabnik
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
Rollup merge of #32316 - tclfs:patch-3, r=steveklabnik

docs: `let` introduces a statement

I changes *expression* to *statement* to make more accurate, because in Rust, `let` introduces a declaration statement.

8 years agoRollup merge of #32308 - bombless:patch-2, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
Rollup merge of #32308 - bombless:patch-2, r=alexcrichton

Fix usability problem when browse document locally

You cannot use `history.replaceState` when you browse locally, it breaks the security policy of Chrome and perhaps other browsers.
Closes https://github.com/rust-lang/rust/issues/32307
Thank @crumblingstatue for the help!

8 years agoRollup merge of #32288 - tclfs:patch-2, r=apasel422
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
Rollup merge of #32288 - tclfs:patch-2, r=apasel422

docs: One typo

I think it's a mistake of spelling.

8 years agoRollup merge of #32271 - frewsxcv:compiletest-ignored-help-note, r=nikomatsakis
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
Rollup merge of #32271 - frewsxcv:compiletest-ignored-help-note, r=nikomatsakis

Add comment about opt-in nature of compiletest note/help messages.

The opt-in functionality was proposed and discussed in
https://github.com/rust-lang/rust/issues/21195

8 years agoRollup merge of #32269 - richo:impl-totokens-p-implitem, r=nikomatsakis
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
Rollup merge of #32269 - richo:impl-totokens-p-implitem, r=nikomatsakis

syntax: impl ToTokens for P<ast::ImplItem>

I'm working on updating zinc for latest rust, and it appears that I need this impl[0].

More generally, I realise that libsyntax is "Whatever the compiler team needs to build a compiler", but should I just open a PR fleshing this out for all types?

https://github.com/hackndev/zinc/blob/master/ioreg/src/builder/setter.rs#L194-L197

8 years agoRollup merge of #32265 - tclfs:patch-1, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
Rollup merge of #32265 - tclfs:patch-1, r=alexcrichton

FreeBSD has already supported Cargo

Both Packages and Ports of FreeBSD have Cargo in present.

8 years agoAuto merge of #32304 - pravic:fix-variadic-ffi-test, r=alexcrichton
bors [Sat, 19 Mar 2016 08:53:11 +0000 (01:53 -0700)]
Auto merge of #32304 - pravic:fix-variadic-ffi-test, r=alexcrichton

test: Fix missing call of function pointer

Also an unused variable warning was here.

8 years agoAuto merge of #32256 - bluss:float-fast-math, r=alexcrichton
bors [Sat, 19 Mar 2016 04:12:00 +0000 (21:12 -0700)]
Auto merge of #32256 - bluss:float-fast-math, r=alexcrichton

Add intrinsics for float arithmetic with `fast` flag enabled

Add intrinsics for float arithmetic with `fast` flag enabled

`fast` a.k.a UnsafeAlgebra is the flag for enabling all "unsafe"
(according to llvm) float optimizations.

See LangRef for more information http://llvm.org/docs/LangRef.html#fast-math-flags

Providing these operations with less associativity rules (for example)
is useful to numerical applications.

For example, the summation loop:

    let sum = 0.;
    for element in data {
        sum += *element;
    }

Using the default floating point semantics, this loop expresses that the
floats must be added in a sequence, one after another. This constraint
is usually completely unintended, and it means that no auto-vectorization
is possible.

8 years agoFix volatile stores of fat pointers
Amanieu d'Antras [Sat, 19 Mar 2016 02:18:33 +0000 (02:18 +0000)]
Fix volatile stores of fat pointers

8 years agoAuto merge of #32050 - achanda:from-slice-v4, r=alexcrichton
bors [Sat, 19 Mar 2016 00:30:22 +0000 (17:30 -0700)]
Auto merge of #32050 - achanda:from-slice-v4, r=alexcrichton

Add an impl for From trait

Converts a u8 slice to a Ipv4Addr
More discussion on this here: https://github.com/rust-lang/rfcs/pull/1498#issuecomment-191921655

8 years agoUse explicit -march flags in the i586 mk file
petevine [Fri, 18 Mar 2016 23:04:27 +0000 (00:04 +0100)]
Use explicit -march flags in the i586 mk file

`-march` should definitely go last, after the environment C(XX)FLAGS, or it's back to square one.
This fixes cross-compilation issues on x86_64.

8 years agoadd assertion and comment about mutability
Niko Matsakis [Fri, 18 Mar 2016 22:40:22 +0000 (18:40 -0400)]
add assertion and comment about mutability

8 years agoAuto merge of #31977 - bluss:partial-eq-save, r=brson
bors [Fri, 18 Mar 2016 21:36:49 +0000 (14:36 -0700)]
Auto merge of #31977 - bluss:partial-eq-save, r=brson

derive: Avoid emitting provided PartialEq, PartialOrd methods for c-like enums

derive: Avoid emitting provided PartialEq, PartialOrd method for c-like enums

`ne` is completely symmetrical with the method `eq`, and we can save
rust code size and compilation time here if we only emit one of them
when possible.

One case where it's easy to recognize is when it's a C-like enum. Most
other cases can not omit ne, because any value field may have a custom
PartialEq implementation.

8 years agoelide noop coercions
Niko Matsakis [Fri, 18 Mar 2016 21:19:52 +0000 (17:19 -0400)]
elide noop coercions

8 years agomake suggestion stuff not swallow errors
Niko Matsakis [Fri, 18 Mar 2016 18:47:40 +0000 (14:47 -0400)]
make suggestion stuff not swallow errors

The older code would sometimes swallow errors or fail to produce a
suggestion. The newer code does not. However, just printing everything
would produce a bunch of new and kind of annoying errors, so continue
to swallow `T: 'a` errors so long as there are other things to show.

8 years agoadd comment clarifying what edges are needed
Niko Matsakis [Thu, 17 Mar 2016 13:55:10 +0000 (09:55 -0400)]
add comment clarifying what edges are needed

8 years agofix coercion behavior for nested references
Niko Matsakis [Thu, 17 Mar 2016 13:47:58 +0000 (09:47 -0400)]
fix coercion behavior for nested references

8 years agopick off some easy cases for LUB/GLB in regions
Niko Matsakis [Thu, 17 Mar 2016 09:22:53 +0000 (05:22 -0400)]
pick off some easy cases for LUB/GLB in regions

the goal here is to minimize creating variables

8 years agodon't create region vars in LUB coercions
Niko Matsakis [Thu, 17 Mar 2016 09:22:26 +0000 (05:22 -0400)]
don't create region vars in LUB coercions

instead, extract the target region out of the autoderef loop

8 years agorename unify to unify_and_identity
Niko Matsakis [Thu, 17 Mar 2016 08:23:27 +0000 (04:23 -0400)]
rename unify to unify_and_identity

8 years agochange coercion to use target region if not LUB
Niko Matsakis [Thu, 17 Mar 2016 08:15:06 +0000 (04:15 -0400)]
change coercion to use target region if not LUB

8 years agoAuto merge of #32309 - aturon:overlap-warning, r=nikomatsakis
bors [Fri, 18 Mar 2016 18:30:30 +0000 (11:30 -0700)]
Auto merge of #32309 - aturon:overlap-warning, r=nikomatsakis

Change inherent overlap error to a warning for now, to ease the breakage

Closes #32247

r? @nikomatsakis

8 years agoChange inherent overlap error to a warning for now, to ease the breakage.
Aaron Turon [Thu, 17 Mar 2016 16:05:24 +0000 (09:05 -0700)]
Change inherent overlap error to a warning for now, to ease the breakage.

8 years agoAdd intrinsics for float arithmetic with `fast` flag enabled
Ulrik Sverdrup [Mon, 14 Mar 2016 23:01:12 +0000 (00:01 +0100)]
Add intrinsics for float arithmetic with `fast` flag enabled

`fast` a.k.a UnsafeAlgebra is the flag for enabling all "unsafe"
(according to llvm) float optimizations.

See LangRef for more information http://llvm.org/docs/LangRef.html#fast-math-flags

Providing these operations with less precise associativity rules (for
example) is useful to numerical applications.

For example, the summation loop:

    let sum = 0.;
    for element in data {
        sum += *element;
    }

Using the default floating point semantics, this loop expresses the
floats must be added in a sequence, one after another. This constraint
is usually completely unintended, and it means that no autovectorization
is possible.

8 years agoFix tidy
Steven Fackler [Fri, 18 Mar 2016 16:30:36 +0000 (09:30 -0700)]
Fix tidy

8 years agoAuto merge of #32282 - sfackler:panic-hook, r=alexcrichton
bors [Fri, 18 Mar 2016 16:21:43 +0000 (09:21 -0700)]
Auto merge of #32282 - sfackler:panic-hook, r=alexcrichton

Adjustments to the panic hook API

Rename `set_handler` and `take_handler` to `set_hook` and `take_hook` since we're not actually "handling" (i.e. fixing) anything.

Also alter `set_hook` to take a `Box<Fn(&PanicInfo) + 'static + Sync + Send>` rather than a parameterized closure since there's otherwise no easy way to re-register a hook that came from `take_hook`.

cc #30449

r? @aturon

8 years agoAdd a since to deprecations
Steven Fackler [Fri, 18 Mar 2016 16:13:55 +0000 (09:13 -0700)]
Add a since to deprecations

8 years agoUpdate LLVM to include a backport to restore AA performance
Björn Steinbrink [Fri, 18 Mar 2016 14:51:17 +0000 (15:51 +0100)]
Update LLVM to include a backport to restore AA performance

cc #31435

8 years agoAuto merge of #32080 - eddyb:transcendent, r=nikomatsakis
bors [Fri, 18 Mar 2016 13:54:58 +0000 (06:54 -0700)]
Auto merge of #32080 - eddyb:transcendent, r=nikomatsakis

Refactor call & function handling in trans, enable MIR bootstrap.

Non-Rust and Rust ABIs were combined into a common codepath, which means:
* The ugly `__rust_abi` "clown shoes" shim for C->Rust FFI is gone, fixes #10116.
* Methods, *including virtual ones* support non-Rust ABIs, closes #30235.
* Non-Rust ABIs also pass fat pointers in two arguments; the result should be identical.
* Zero-sized types are never passed as arguments; again, behavior shouldn't change.

Additionally, MIR support for calling intrinsics (through old trans) was implemented.
Alongside assorted fixes, it enabled MIR to launch :rocket: and do a *complete* bootstrap.
To try it yourself, `./configure --enable-orbit` *or* `make RUSTFLAGS="-Z orbit"`.

8 years agotests: Update run-make/issue-25581 to reflect how fat pointers are passed.
Eduard Burtescu [Fri, 18 Mar 2016 13:54:27 +0000 (15:54 +0200)]
tests: Update run-make/issue-25581 to reflect how fat pointers are passed.

8 years agotrans: Don't ignore zero-sized struct arguments on x86_64-pc-windows-gnu.
Eduard Burtescu [Fri, 18 Mar 2016 12:28:11 +0000 (14:28 +0200)]
trans: Don't ignore zero-sized struct arguments on x86_64-pc-windows-gnu.

8 years agoliveness: substitute bound regions with free ones before normalizing the return type
Jonas Schievink [Fri, 18 Mar 2016 10:34:51 +0000 (11:34 +0100)]
liveness: substitute bound regions with free ones before normalizing the return type

Fixes #32323

8 years agoAuto merge of #32248 - dstu:master, r=alexcrichton
bors [Fri, 18 Mar 2016 09:46:35 +0000 (02:46 -0700)]
Auto merge of #32248 - dstu:master, r=alexcrichton

Expose the key of Entry variants for HashMap and BTreeMap.

This PR addresses [issue 1541](https://github.com/rust-lang/rfcs/issues/1541) by exposing the key of `HashMap` and `BTreeMap` entry variants. Basic tests are provided.

8 years agoAuto merge of #32207 - achanda:ipv6-doc, r=alexcrichton
bors [Fri, 18 Mar 2016 06:52:55 +0000 (23:52 -0700)]
Auto merge of #32207 - achanda:ipv6-doc, r=alexcrichton

Add is_documentation for IPv6

This function returns true if the given IPv6 is reserved for
documentation. Also, reject this block in the is_global check

8 years agoMake AssertRecoverSafe's field public
Steven Fackler [Fri, 18 Mar 2016 05:43:17 +0000 (22:43 -0700)]
Make AssertRecoverSafe's field public

It's basically the very definition of a newtype, so we might as well
make things easy on people and let them construct and access it
directly.

8 years agotrans: Decide whether to load volatile_store's argument based on its ArgType.
Eduard Burtescu [Fri, 18 Mar 2016 03:29:53 +0000 (05:29 +0200)]
trans: Decide whether to load volatile_store's argument based on its ArgType.

8 years agoMinor phrasing adjustment
Todd Lucas [Fri, 18 Mar 2016 03:14:05 +0000 (20:14 -0700)]
Minor phrasing adjustment

8 years agoUpdate the not-at-all-pretty pain-o-tron-4000+264 test.
Eduard Burtescu [Fri, 18 Mar 2016 00:22:32 +0000 (02:22 +0200)]
Update the not-at-all-pretty pain-o-tron-4000+264 test.

8 years agotrans: Pass newtypes of immediates as their inner-most type again.
Eduard Burtescu [Thu, 17 Mar 2016 23:01:47 +0000 (01:01 +0200)]
trans: Pass newtypes of immediates as their inner-most type again.

8 years agorustbuild: Fix cross to netbsd from Linux
Alex Crichton [Thu, 17 Mar 2016 20:58:26 +0000 (13:58 -0700)]
rustbuild: Fix cross to netbsd from Linux

Apparently the NetBSD compiler-rt builds into the linux directory as well.
I'm... detecting a trend!

8 years agomir: Don't memset allocas of types that do not require drop.
Eduard Burtescu [Thu, 10 Mar 2016 19:47:25 +0000 (21:47 +0200)]
mir: Don't memset allocas of types that do not require drop.

8 years agomir: Store immediates used for indirect arguments in an alloca.
Eduard Burtescu [Thu, 10 Mar 2016 19:30:52 +0000 (21:30 +0200)]
mir: Store immediates used for indirect arguments in an alloca.

8 years agoAdd #[rustc_no_mir] to make tests pass with -Z orbit.
Eduard Burtescu [Thu, 10 Mar 2016 19:20:09 +0000 (21:20 +0200)]
Add #[rustc_no_mir] to make tests pass with -Z orbit.

8 years agocompiletest: Add rustc-env for run-pass/super-fast-paren-parsing.
Eduard Burtescu [Thu, 10 Mar 2016 11:08:20 +0000 (13:08 +0200)]
compiletest: Add rustc-env for run-pass/super-fast-paren-parsing.

8 years agomir: Don't forget to drop arguments.
Eduard Burtescu [Thu, 10 Mar 2016 04:35:41 +0000 (06:35 +0200)]
mir: Don't forget to drop arguments.

8 years agohir_map: Provide expression and statement attributes.
Eduard Burtescu [Thu, 10 Mar 2016 02:12:36 +0000 (04:12 +0200)]
hir_map: Provide expression and statement attributes.

8 years agotrans: Do not depend on having Expr's around for generic_simd_intrinsic.
Eduard Burtescu [Thu, 10 Mar 2016 00:17:45 +0000 (02:17 +0200)]
trans: Do not depend on having Expr's around for generic_simd_intrinsic.

8 years agoconst_eval: Take just one set of substitutions in lookup_const_by_id.
Eduard Burtescu [Thu, 10 Mar 2016 00:04:55 +0000 (02:04 +0200)]
const_eval: Take just one set of substitutions in lookup_const_by_id.

8 years agomir: Use usize instead of u32 for indexing slices.
Eduard Burtescu [Thu, 10 Mar 2016 00:03:00 +0000 (02:03 +0200)]
mir: Use usize instead of u32 for indexing slices.

8 years agoAdd -Z orbit for forcing MIR for everything, unless #[rustc_no_mir] is used.
Eduard Burtescu [Wed, 9 Mar 2016 20:46:00 +0000 (22:46 +0200)]
Add -Z orbit for forcing MIR for everything, unless #[rustc_no_mir] is used.

8 years agohir, mir: Separate HIR expressions / MIR operands from InlineAsm.
Eduard Burtescu [Wed, 9 Mar 2016 20:17:02 +0000 (22:17 +0200)]
hir, mir: Separate HIR expressions / MIR operands from InlineAsm.

8 years agomir: Translate Rvalue::Slice without relying on tvec.
Eduard Burtescu [Wed, 9 Mar 2016 19:49:23 +0000 (21:49 +0200)]
mir: Translate Rvalue::Slice without relying on tvec.

8 years agomir: Get the right non-reference type for binding patterns.
Eduard Burtescu [Wed, 9 Mar 2016 21:32:52 +0000 (23:32 +0200)]
mir: Get the right non-reference type for binding patterns.

8 years agomir: Don't lose sub-patterns inside slice patterns.
Eduard Burtescu [Wed, 9 Mar 2016 12:21:31 +0000 (14:21 +0200)]
mir: Don't lose sub-patterns inside slice patterns.

8 years agomir: Match against slices by calling PartialEq::eq.
Eduard Burtescu [Wed, 9 Mar 2016 12:20:50 +0000 (14:20 +0200)]
mir: Match against slices by calling PartialEq::eq.

8 years agotrans: Make everything used from within at_start Builder-friendly.
Eduard Burtescu [Wed, 9 Mar 2016 12:20:22 +0000 (14:20 +0200)]
trans: Make everything used from within at_start Builder-friendly.

8 years agomir: Call set_operand_dropped in more places, specifically Unsize casts.
Eduard Burtescu [Tue, 8 Mar 2016 13:03:02 +0000 (15:03 +0200)]
mir: Call set_operand_dropped in more places, specifically Unsize casts.

8 years agomir: Translate intrinsics, via old trans where possible.
Eduard Burtescu [Tue, 8 Mar 2016 12:40:37 +0000 (14:40 +0200)]
mir: Translate intrinsics, via old trans where possible.

8 years agomir: Reintroduce the temporary block after invokes, to handle critical edges.
Eduard Burtescu [Tue, 8 Mar 2016 12:40:04 +0000 (14:40 +0200)]
mir: Reintroduce the temporary block after invokes, to handle critical edges.

8 years agomir: Trigger closure instantiations when the closure value is created.
Eduard Burtescu [Tue, 8 Mar 2016 12:38:44 +0000 (14:38 +0200)]
mir: Trigger closure instantiations when the closure value is created.

8 years agotrans: Load and cache cross-crate Mir instances in the shared context.
Eduard Burtescu [Tue, 8 Mar 2016 12:38:13 +0000 (14:38 +0200)]
trans: Load and cache cross-crate Mir instances in the shared context.

8 years agomir: Don't shadow the "args" variable in Call translation.
Eduard Burtescu [Tue, 8 Mar 2016 12:31:48 +0000 (14:31 +0200)]
mir: Don't shadow the "args" variable in Call translation.

8 years agomir: Truncate bool to i1 for SwitchInt.
Eduard Burtescu [Tue, 8 Mar 2016 12:31:23 +0000 (14:31 +0200)]
mir: Truncate bool to i1 for SwitchInt.

8 years agotrans: Take a &Builder in call_memcpy, like call_memset.
Eduard Burtescu [Tue, 8 Mar 2016 12:29:46 +0000 (14:29 +0200)]
trans: Take a &Builder in call_memcpy, like call_memset.

8 years agomir: Support RustCall ABI functions.
Eduard Burtescu [Tue, 8 Mar 2016 12:24:44 +0000 (14:24 +0200)]
mir: Support RustCall ABI functions.

8 years agomir: Load FatPtr constants instead of keeping them indirect.
Eduard Burtescu [Tue, 8 Mar 2016 12:23:23 +0000 (14:23 +0200)]
mir: Load FatPtr constants instead of keeping them indirect.

8 years agomir: Don't load the discriminant, it's already in immediate form.
Eduard Burtescu [Tue, 8 Mar 2016 12:21:11 +0000 (14:21 +0200)]
mir: Don't load the discriminant, it's already in immediate form.

8 years agomir: Don't use ConstVal when adjustments are involved, as they would be lost.
Eduard Burtescu [Tue, 8 Mar 2016 12:20:06 +0000 (14:20 +0200)]
mir: Don't use ConstVal when adjustments are involved, as they would be lost.

8 years agomir: Unsize ConstVal::ByteStr before comparing &[u8] against it.
Eduard Burtescu [Tue, 8 Mar 2016 12:17:35 +0000 (14:17 +0200)]
mir: Unsize ConstVal::ByteStr before comparing &[u8] against it.