]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoFix an unnecessary use of `cast::transmute`
Tobias Bucher [Sat, 5 Apr 2014 18:38:35 +0000 (20:38 +0200)]
Fix an unnecessary use of `cast::transmute`

Wherever possible, more specialized variants of said functions should be used,
such as in this case `cast::transmute_mmut_unsafe`.

10 years agoauto merge of #13333 : Ryman/rust/improve_incompatible_type_error, r=alexcrichton
bors [Sat, 5 Apr 2014 15:41:32 +0000 (08:41 -0700)]
auto merge of #13333 : Ryman/rust/improve_incompatible_type_error, r=alexcrichton

This can be a frustrating error message, ideally we should print the signature mismatch, but hinting that it's a trait incompatibility helps tracking root cause. Also beefed up the testcases for this.

Ideally we would print the signature mismatch in the error helper?

10 years agoauto merge of #13332 : mbrubeck/rust/doc-edit, r=huonw
bors [Sat, 5 Apr 2014 14:21:36 +0000 (07:21 -0700)]
auto merge of #13332 : mbrubeck/rust/doc-edit, r=huonw

Also add the new `proc` keyword to the documentation.

10 years agoauto merge of #13331 : pongad/rust/remove-wrapper, r=thestinger
bors [Sat, 5 Apr 2014 13:01:36 +0000 (06:01 -0700)]
auto merge of #13331 : pongad/rust/remove-wrapper, r=thestinger

Fixes #12713

10 years agoauto merge of #13330 : huonw/rust/loop-error, r=alexcrichton
bors [Sat, 5 Apr 2014 11:41:33 +0000 (04:41 -0700)]
auto merge of #13330 : huonw/rust/loop-error, r=alexcrichton

rustc: move the check_loop pass earlier.

This pass is purely AST based, and by running it earlier we emit more
useful error messages, e.g. type inference fails in the case of
`let r = break;` with few constraints on `r`, but it's more useful to be told that
the `break` is outside the loop (rather than a type error) when it is.

Closes #13292.

10 years agoauto merge of #13329 : ckendell/rust/remmanaged_tutorial, r=brson
bors [Sat, 5 Apr 2014 10:21:34 +0000 (03:21 -0700)]
auto merge of #13329 : ckendell/rust/remmanaged_tutorial, r=brson

Fixes #13287
Completes work started in #13298

Removed all reference to and sample code using managed boxes/pointers.

10 years agoauto merge of #13284 : pnkfelix/rust/more-fs-info-on-crate-mismatch, r=alexcrichton
bors [Sat, 5 Apr 2014 04:06:34 +0000 (21:06 -0700)]
auto merge of #13284 : pnkfelix/rust/more-fs-info-on-crate-mismatch, r=alexcrichton

Fix #13266.

There is a little bit of acrobatics in the definition of `crate_paths`
to avoid calling `clone()` on the dylib/rlib unless we actually are
going to need them.

The other oddity is that I have replaced the `root_ident: Option<&str>`
parameter with a `root: &Option<CratePaths>`, which may surprise one
who was expecting to see something like: `root: Option<&CratePaths>`.
I went with the approach here because I could not come up with code for
the alternative that was acceptable to the borrow checker.

10 years agoRough regression test for #13266.
Felix S. Klock II [Sat, 5 Apr 2014 01:53:28 +0000 (03:53 +0200)]
Rough regression test for #13266.

All it checks, unfortunately, is that you actually printed at least
two lines for crateA paths and at least one line for crateB paths.
But that's enough to capture the spirit of the bug, I think.  I did
not bother trying to verify that the paths themselves reflected where
the crates end up.

10 years agoAccumulate list of paths for crate hash mismatch.
Felix S. Klock II [Sat, 5 Apr 2014 01:49:03 +0000 (03:49 +0200)]
Accumulate list of paths for crate hash mismatch.

(i.e. semi-generalized version of prior errorinfo gathering.)

Also revised presentation to put each path on its own line, prefixed
by file:linenum information.

10 years agoAdded session.fileline_note() method and support infrastucture for it.
Felix S. Klock II [Sat, 5 Apr 2014 01:46:43 +0000 (03:46 +0200)]
Added session.fileline_note() method and support infrastucture for it.

Add way to print notes with just file:linenum prefix (preserving
integration with source lookup for e.g. vi and emacs) but don't repeat
the other span info.

10 years agolibrustc: Improve error message for incompatible trait method signatures.
Kevin Butler [Sat, 5 Apr 2014 01:19:33 +0000 (02:19 +0100)]
librustc: Improve error message for incompatible trait method signatures.

10 years agoRemove references to obsolete `do` keyword
Matt Brubeck [Sat, 5 Apr 2014 00:32:46 +0000 (17:32 -0700)]
Remove references to obsolete `do` keyword

Also add the new `proc` keyword to the documentation.

10 years agoRemoved cmath and instrinsic wrapper.
Michael Darakananda [Sat, 5 Apr 2014 00:08:31 +0000 (20:08 -0400)]
Removed cmath and instrinsic wrapper.

10 years agorustc: move the check_loop pass earlier.
Huon Wilson [Fri, 4 Apr 2014 23:05:31 +0000 (10:05 +1100)]
rustc: move the check_loop pass earlier.

This pass is purely AST based, and by running it earlier we emit more
useful error messages, e.g. type inference fails in the case of `let r =
break;` with few constraints on `r`, but its more useful to be told that
the `break` is outside a loop (rather than a type error) when it is.

Closes #13292.

10 years agoRemoved all instance of `@` in code examples.
Christopher Kendell [Fri, 4 Apr 2014 23:26:33 +0000 (16:26 -0700)]
Removed all instance of `@` in code examples.

10 years agoSmall change to example to make variable values more sensible.
Christopher Kendell [Fri, 4 Apr 2014 23:25:52 +0000 (16:25 -0700)]
Small change to example to make variable values more sensible.

10 years agoauto merge of #13326 : alexcrichton/rust/rollup, r=alexcrichton
bors [Fri, 4 Apr 2014 23:01:44 +0000 (16:01 -0700)]
auto merge of #13326 : alexcrichton/rust/rollup, r=alexcrichton

Closes #13313 (Fix typo in README.md)
Closes #13311 (Fix inner attribute syntax from `#[foo];` to `#![foo]`)
Closes #13309 (Add stdlib docs to the Linux binary tarball.)
Closes #13308 (syntax: remove obsolete mutability from ExprVec and ExprRepeat.)
Closes #13306 (TrieSet should impl Set/MutableSet; add with_capacity to PriorityQueue/SmallIntMap)
Closes #13303 (Register new snapshots)
Closes #13274 (Added grow_fn and retain to Vec)

*Issues Closed*

Closes #13249

10 years agoTest fixes from rollup
Alex Crichton [Fri, 4 Apr 2014 20:45:24 +0000 (13:45 -0700)]
Test fixes from rollup

10 years agoAdded grow_fn and retain to Vec
Michael Darakananda [Thu, 3 Apr 2014 03:10:36 +0000 (23:10 -0400)]
Added grow_fn and retain to Vec

10 years agoRegister new snapshots
Alex Crichton [Fri, 4 Apr 2014 04:52:13 +0000 (21:52 -0700)]
Register new snapshots

10 years agoextra: Add with_capacity to PriorityQueue and SmallIntMap
Erick Tryzelaar [Fri, 4 Apr 2014 03:47:53 +0000 (20:47 -0700)]
extra: Add with_capacity to PriorityQueue and SmallIntMap

10 years agostd: TrieSet should implement container::{,Mutable}Set
Erick Tryzelaar [Wed, 9 Oct 2013 16:55:00 +0000 (09:55 -0700)]
std: TrieSet should implement container::{,Mutable}Set

10 years agosyntax: remove obsolete mutability from ExprVec and ExprRepeat.
Eduard Burtescu [Fri, 4 Apr 2014 10:12:18 +0000 (13:12 +0300)]
syntax: remove obsolete mutability from ExprVec and ExprRepeat.

10 years agoAdd stdlib docs to the Linux binary tarball.
Huon Wilson [Fri, 4 Apr 2014 10:56:22 +0000 (21:56 +1100)]
Add stdlib docs to the Linux binary tarball.

These are not installed anywhere, but are included under `./doc` for
those who want an offline copy with their nightlies. This increases the
size of the (compressed) tarball from 76 to 83 MB.

10 years agoFix inner attribute syntax from `#[foo];` to `#![foo]`
Timothée Ravier [Fri, 4 Apr 2014 00:55:06 +0000 (02:55 +0200)]
Fix inner attribute syntax from `#[foo];` to `#![foo]`

From the 0.10 changelog:
 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.

10 years agoUpdate README.md
Falco Hirschenberger [Fri, 4 Apr 2014 16:22:55 +0000 (18:22 +0200)]
Update README.md

Fix typo

10 years agoauto merge of #13272 : ipetkov/rust/rustdoc-ignored-tests, r=alexcrichton
bors [Fri, 4 Apr 2014 18:56:53 +0000 (11:56 -0700)]
auto merge of #13272 : ipetkov/rust/rustdoc-ignored-tests, r=alexcrichton

librustdoc: instead of skipping ignored tests, pass them to libtest
so it can report them as such.  If a test is marked as `notrust`,
however, it will not show up in the final report.

Fix #12939

10 years agoauto merge of #12956 : killerswan/rust/docs, r=alexcrichton
bors [Fri, 4 Apr 2014 17:01:57 +0000 (10:01 -0700)]
auto merge of #12956 : killerswan/rust/docs, r=alexcrichton

10 years agoauto merge of #13301 : erickt/rust/remove-refcell-get, r=huonw
bors [Fri, 4 Apr 2014 15:41:50 +0000 (08:41 -0700)]
auto merge of #13301 : erickt/rust/remove-refcell-get, r=huonw

`RefCell::get` can be a bit surprising, because it actually clones the wrapped value. This removes `RefCell::get` and replaces all the users with `RefCell::borrow()` when it can, and `RefCell::borrow().clone()` when it can't. It removes `RefCell::set` for consistency. This closes #13182.

It also fixes an infinite loop in a test when debugging is on.

10 years agoauto merge of #13298 : ckendell/rust/remove_managed_pointers_from_tutorial, r=cmr
bors [Fri, 4 Apr 2014 14:26:51 +0000 (07:26 -0700)]
auto merge of #13298 : ckendell/rust/remove_managed_pointers_from_tutorial, r=cmr

Work on #13287

This is not ready for a merge yet, but I wanted to get some eyes on what I have done so far.

As of right now, all references in the text to managed boxes or pointers are removed. Code associated with those specific sections of text have likewise been altered. I also removed all references to managed closures.

There is a small change I would like to add to the work done in 3137cd5, on the new lines 1495 and 1496, I would like to change those values to 10 and 20. I did the same in a later change on lines 1596 and 1508.

There are still bits of sample code that use managed pointers and the sigil @. Those are next on my list to remove, but I wanted to have the outstanding changes reviewed first. The uses of @ in the code samples are a bit more embedded, and I will need to be more careful changing them as to not change the purpose of the code examples.

I ensured that make check still passes, although I'm not sure if that actually tests the code in tutorial.md.

One issues I ran into, and tried to avoid, was that `tutorial.md` is formatted with a nice column limit. I was unsure how this was enforced, so wherever I edited a line, I did my best to keep edits on the line they previously existed on. As such, the plain text of `tutorial.md` looks a bit strange as I've left it, and I will clean that up as suggested. The rendered markdown output should not be affected.

10 years agoauto merge of #13295 : huonw/rust/gate-concat-idents, r=alexcrichton
bors [Fri, 4 Apr 2014 13:07:02 +0000 (06:07 -0700)]
auto merge of #13295 : huonw/rust/gate-concat-idents, r=alexcrichton

rustc: feature-gate `concat_idents!`.

concat_idents! is not as useful as it could be, due to macros only being
allowed in limited places, and hygiene, so lets feature gate it until we
make a decision about it.

cc #13294

10 years agoauto merge of #13291 : thestinger/rust/no_null, r=alexcrichton
bors [Fri, 4 Apr 2014 11:41:49 +0000 (04:41 -0700)]
auto merge of #13291 : thestinger/rust/no_null, r=alexcrichton

This was missed when dropping the null-termination from our string
types. An explicit null byte can still be placed anywhere in a string if
desired, but there's no reason to stick one at the end of every string
constant.

10 years agorustc: feature-gate `concat_idents!`.
Huon Wilson [Thu, 3 Apr 2014 23:24:21 +0000 (10:24 +1100)]
rustc: feature-gate `concat_idents!`.

concat_idents! is not as useful as it could be, due to macros only being
allowed in limited places, and hygiene, so lets feature gate it until we
make a decision about it.

cc #13294

10 years ago[std::cmp] add missing docs and provide an example
Kevin Cantu [Sun, 16 Mar 2014 21:26:54 +0000 (14:26 -0700)]
[std::cmp] add missing docs and provide an example

10 years agoauto merge of #13207 : cmr/rust/attrib-reference, r=kballard
bors [Fri, 4 Apr 2014 09:16:48 +0000 (02:16 -0700)]
auto merge of #13207 : cmr/rust/attrib-reference, r=kballard

10 years agomanual: fix a broken example
Corey Richardson [Fri, 4 Apr 2014 08:08:13 +0000 (04:08 -0400)]
manual: fix a broken example

10 years agoauto merge of #13255 : alexcrichton/rust/issue-5605, r=huonw
bors [Fri, 4 Apr 2014 08:01:51 +0000 (01:01 -0700)]
auto merge of #13255 : alexcrichton/rust/issue-5605, r=huonw

These syntax extensions need a place to be documented, and this starts passing a
`--cfg dox` parameter to `rustdoc` when building and testing documentation in
order to document macros so that they have no effect on the compiled crate, but
only documentation.

Closes #5605

10 years agomanual: refine ECMA-335 reference for attributes
Corey Richardson [Fri, 4 Apr 2014 05:35:50 +0000 (01:35 -0400)]
manual: refine ECMA-335 reference for attributes

10 years agomanual: further attribute clarifications
Corey Richardson [Fri, 4 Apr 2014 04:50:36 +0000 (00:50 -0400)]
manual: further attribute clarifications

- Sort attributes lexicographically
- Use new attribute syntax consistently
- Fix wording describing new attribute syntax
- Expand section on `repr`

10 years agomanual: fix attribute ebnf
Corey Richardson [Fri, 4 Apr 2014 05:17:35 +0000 (01:17 -0400)]
manual: fix attribute ebnf

10 years agomanual: update style
Corey Richardson [Fri, 4 Apr 2014 05:04:37 +0000 (01:04 -0400)]
manual: update style

10 years agorustdoc: Fix reporting of ignored tests
Ivan Petkov [Fri, 4 Apr 2014 06:03:01 +0000 (23:03 -0700)]
rustdoc: Fix reporting of ignored tests

librustdoc: instead of skipping ignored tests, pass them to libtest
so it can report them as such.  If a test is marked as `notrust`,
however, it will not show up in the final report.

10 years agoauto merge of #12964 : gereeter/rust/extended-atomics, r=alexcrichton
bors [Fri, 4 Apr 2014 05:06:50 +0000 (22:06 -0700)]
auto merge of #12964 : gereeter/rust/extended-atomics, r=alexcrichton

Fixes #12949.

10 years agoetc: attempts at fixing editor highlighting for new attribute syntax
Corey Richardson [Sun, 30 Mar 2014 12:34:32 +0000 (08:34 -0400)]
etc: attempts at fixing editor highlighting for new attribute syntax

10 years agomanual: many fixes
Corey Richardson [Sun, 30 Mar 2014 12:30:25 +0000 (08:30 -0400)]
manual: many fixes

Mostly around attributes and language items.

10 years agomanual: update the note about reserved attributes
Corey Richardson [Sun, 30 Mar 2014 03:50:05 +0000 (23:50 -0400)]
manual: update the note about reserved attributes

10 years agotest: avoid infinite loop in out-of-stack.rs
Erick Tryzelaar [Wed, 2 Apr 2014 05:07:37 +0000 (22:07 -0700)]
test: avoid infinite loop in out-of-stack.rs

This fixes #13238. It avoids an infinite loop when compiling
the tests with `-g`. Without this change, the debuginfo on
`black_box` prevents the method from being inlined, which
allows llvm to convert `silent_recurse` into a tail-call. This
then loops forever instead of consuming all the stack like it
is supposed to. This patch forces inlining `black_box`, which
triggers the right error.

10 years agostd: Remove `RefCell::set()`
Erick Tryzelaar [Wed, 2 Apr 2014 13:55:33 +0000 (06:55 -0700)]
std: Remove `RefCell::set()`

10 years agostd: Remove `RefCell::get()`
Erick Tryzelaar [Fri, 28 Mar 2014 17:29:55 +0000 (10:29 -0700)]
std: Remove `RefCell::get()`

It's surprising that `RefCell::get()` is implicitly doing a clone
on a value. This patch removes it and replaces all users with
either `.borrow()` when we can autoderef, or `.borrow().clone()`
when we cannot.

10 years agoauto merge of #13296 : brson/rust/0.11-pre, r=alexcrichton
bors [Fri, 4 Apr 2014 02:56:45 +0000 (19:56 -0700)]
auto merge of #13296 : brson/rust/0.11-pre, r=alexcrichton

This also changes some of the download links in the documentation
to 'nightly'.

10 years agoauto merge of #13237 : alexcrichton/rust/private-tuple-structs, r=brson
bors [Fri, 4 Apr 2014 01:41:45 +0000 (18:41 -0700)]
auto merge of #13237 : alexcrichton/rust/private-tuple-structs, r=brson

This is the final commit need to implement [RFC #4](https://github.com/rust-lang/rfcs/blob/master/active/0004-private-fields.md), it makes all tuple struct fields private by default, overridable with the `pub` keyword.

I'll note one divergence from the original RFC which is outlined in the first commit.

10 years agostop asking LLVM to null-terminate strings
Daniel Micay [Thu, 3 Apr 2014 20:26:08 +0000 (16:26 -0400)]
stop asking LLVM to null-terminate strings

This was missed when dropping the null-termination from our string
types. An explicit null byte can still be placed anywhere in a string if
desired, but there's no reason to stick one at the end of every string
constant.

10 years agoAdd fetch_and, fetch_or, fetch_xor to AtomicInt, AtomicUint
Jonathan S [Mon, 17 Mar 2014 03:09:28 +0000 (22:09 -0500)]
Add fetch_and, fetch_or, fetch_xor to AtomicInt, AtomicUint

10 years agoauto merge of #13290 : alexcrichton/rust/rollup, r=alexcrichton
bors [Fri, 4 Apr 2014 00:17:02 +0000 (17:17 -0700)]
auto merge of #13290 : alexcrichton/rust/rollup, r=alexcrichton

Closes #13285 (rustc: Stop using LLVMGetSectionName)
Closes #13280 (std: override clone_from for Vec.)
Closes #13277 (serialize: add a few missing pubs to base64)
Closes #13275 (Add and remove some ignore-win32 flags)
Closes #13273 (Removed managed boxes from libarena.)
Closes #13270 (Minor copy-editing for the tutorial)
Closes #13267 (fix Option<~ZeroSizeType>)
Closes #13265 (Update emacs mode to support new `#![inner(attribute)]` syntax.)
Closes #13263 (syntax: Remove AbiSet, use one Abi)

10 years agoTest fixes from the rollup
Alex Crichton [Thu, 3 Apr 2014 21:09:16 +0000 (14:09 -0700)]
Test fixes from the rollup

10 years agoBump version to 0.11-pre
Brian Anderson [Thu, 3 Apr 2014 23:28:46 +0000 (16:28 -0700)]
Bump version to 0.11-pre

This also changes some of the download links in the documentation
to 'nightly'.

10 years agostd: Document builtin syntax extensions
Alex Crichton [Tue, 1 Apr 2014 22:04:42 +0000 (15:04 -0700)]
std: Document builtin syntax extensions

These syntax extensions need a place to be documented, and this starts passing a
`--cfg dox` parameter to `rustdoc` when building and testing documentation in
order to document macros so that they have no effect on the compiled crate, but
only documentation.

Closes #5605

10 years agoRemoved all references to managed closures.
Christopher Kendell [Thu, 3 Apr 2014 22:48:32 +0000 (15:48 -0700)]
Removed all references to managed closures.

10 years agoRemoved references to managed boxes/pointers from the tutorial text. Code
Christopher Kendell [Thu, 3 Apr 2014 22:38:19 +0000 (15:38 -0700)]
Removed references to managed boxes/pointers from the tutorial text. Code
examples in relevant sections were similarly altered.

10 years agoauto merge of #13286 : alexcrichton/rust/release, r=brson
bors [Thu, 3 Apr 2014 20:52:03 +0000 (13:52 -0700)]
auto merge of #13286 : alexcrichton/rust/release, r=brson

Merging the 0.10 release into the master branch.

10 years agosyntax: Remove AbiSet, use one Abi
Alex Crichton [Wed, 2 Apr 2014 08:19:41 +0000 (01:19 -0700)]
syntax: Remove AbiSet, use one Abi

This change removes the AbiSet from the AST, converting all usage to have just
one Abi value. The current scheme selects a relevant ABI given a list of ABIs
based on the target architecture and how relevant each ABI is to that
architecture.

Instead of this mildly complicated scheme, only one ABI will be allowed in abi
strings, and pseudo-abis will be created for special cases as necessary. For
example the "system" abi exists for stdcall on win32 and C on win64.

Closes #10049

10 years agoUpdate emacs mode to support new `#![inner(attribute)]` syntax.
Felix S. Klock II [Wed, 2 Apr 2014 21:50:20 +0000 (23:50 +0200)]
Update emacs mode to support new `#![inner(attribute)]` syntax.

10 years agofix Option<~ZeroSizeType>
Daniel Micay [Wed, 2 Apr 2014 21:23:52 +0000 (17:23 -0400)]
fix Option<~ZeroSizeType>

1778b6361627c5894bf75ffecf427573af02d390 provided the guarantee of no
`exchange_free` calls for ~ZeroSizeType, so a sentinel can now be used
without overhead.

Closes #11998

10 years agoMinor spelling/grammar/usage fixes.
Matt Brubeck [Thu, 3 Apr 2014 00:02:18 +0000 (17:02 -0700)]
Minor spelling/grammar/usage fixes.

Note: "different to" is not exactly incorrect, but "different from" is more
commonly accepted in both US and Commonwealth English, and also more
consistent with other usage within this tutorial.

10 years agoFix reference to "these two traits."
Matt Brubeck [Wed, 2 Apr 2014 23:56:23 +0000 (16:56 -0700)]
Fix reference to "these two traits."

There are actually three traits listed.

10 years ago`extern crate` and `mod` are not easily confused
Matt Brubeck [Wed, 2 Apr 2014 23:54:33 +0000 (16:54 -0700)]
`extern crate` and `mod` are not easily confused

Remove some statements that used to refer to similarities between `mod` and
`extern mod`, before the latter was renamed to `extern crate`.

10 years agoRemoved managed boxes from libarena.
Benjamin Adamson [Thu, 3 Apr 2014 03:06:55 +0000 (20:06 -0700)]
Removed managed boxes from libarena.

10 years agotest/run-pass: Add/remove some ignore-win32 flags
klutzy [Thu, 3 Apr 2014 03:34:26 +0000 (12:34 +0900)]
test/run-pass: Add/remove some ignore-win32 flags

10 years agotest/debug-info: Add/remove ignore-win32 flags
klutzy [Thu, 3 Apr 2014 03:18:58 +0000 (12:18 +0900)]
test/debug-info: Add/remove ignore-win32 flags

Fixes #10474

10 years agocompiletest: Fix bitrotted win32 routines
klutzy [Tue, 1 Apr 2014 07:10:56 +0000 (16:10 +0900)]
compiletest: Fix bitrotted win32 routines

10 years agoserialize: add a few missing pubs to base64
Arcterus [Thu, 3 Apr 2014 07:28:40 +0000 (00:28 -0700)]
serialize: add a few missing pubs to base64

10 years agostd: override clone_from for Vec.
Huon Wilson [Thu, 3 Apr 2014 11:28:45 +0000 (22:28 +1100)]
std: override clone_from for Vec.

A vector can reuse its allocation (and the allocations/resources of any
contained values) when cloning into an already-instantiated vector, so
we might as well do so.

10 years agorustllvm: Remove a no longer needed file
Alex Crichton [Thu, 3 Apr 2014 17:49:57 +0000 (10:49 -0700)]
rustllvm: Remove a no longer needed file

The .def.in files haven't been necessary since the switch to static linking
awhile back.

10 years agorustc: Stop using LLVMGetSectionName
Alex Crichton [Thu, 3 Apr 2014 17:45:36 +0000 (10:45 -0700)]
rustc: Stop using LLVMGetSectionName

The recent pull request to remove libc from libstd has hit a wall in compiling
on windows, and I've been trying to investigate on the try bots as to why (it
compiles locally just fine). To the best of my knowledge, the LLVM section
iterator is behaving badly when iterating over the sections of the libc DLL.

Upon investigating the LLVMGetSectionName function in LLVM, I discovered that
this function doesn't always return a null-terminated string. It returns the
data pointer of a StringRef instance (LLVM's equivalent of &str essentially),
but it has no method of returning the length of the name of the section.

This commit modifies the section iteration when loading libraries to invoke a
custom LLVMRustGetSectionName which will correctly return both the length and
the data pointer.

I have not yet verified that this will fix landing liblibc, as it will require a
snapshot before doing a full test. Regardless, this is a worrisome situation
regarding the LLVM API, and should likely be fixed anyway.

10 years agoAfter a hash mismatch error, emit file-system paths of crates involved.
Felix S. Klock II [Thu, 3 Apr 2014 15:43:57 +0000 (17:43 +0200)]
After a hash mismatch error, emit file-system paths of crates involved.

Fix #13266.

There is a little bit of acrobatics in the definition of `crate_paths`
to avoid calling `clone()` on the dylib/rlib unless we actually are
going to need them.

The other oddity is that I have replaced the `root_ident: Option<&str>`
parameter with a `root: &Option<CratePaths>`, which may surprise one
who was expecting to see something like: `root: Option<&CratePaths>`.
I went with the approach here because I could not come up with code for
the alternative that was acceptable to the borrow checker.

10 years agoauto merge of #13244 : cmr/rust/tbaa, r=alexcrichton
bors [Thu, 3 Apr 2014 10:42:02 +0000 (03:42 -0700)]
auto merge of #13244 : cmr/rust/tbaa, r=alexcrichton

10 years agoauto merge of #13262 : ben0x539/rust/guide-runtime-fixup, r=alexcrichton
bors [Thu, 3 Apr 2014 00:51:48 +0000 (17:51 -0700)]
auto merge of #13262 : ben0x539/rust/guide-runtime-fixup, r=alexcrichton

10 years agoTweak the installation instructions in the README
Alex Crichton [Wed, 2 Apr 2014 23:59:39 +0000 (16:59 -0700)]
Tweak the installation instructions in the README

Update the instructions to reflect that we have binary installers for all
supported platforms, and move the building from source directions into a
dedicated "Building from Source" directory.

10 years agoUpdate AUTHORS.txt for 0.10
Brian Anderson [Wed, 2 Apr 2014 23:57:02 +0000 (16:57 -0700)]
Update AUTHORS.txt for 0.10

10 years agoMinor adjustments to the 0.10 release notes.
Huon Wilson [Tue, 1 Apr 2014 11:55:09 +0000 (22:55 +1100)]
Minor adjustments to the 0.10 release notes.

Mention another lint, fix a typo, and rearrange some things.

10 years agoauto merge of #13257 : alexcrichton/rust/index-uint, r=pnkfelix
bors [Wed, 2 Apr 2014 23:36:50 +0000 (16:36 -0700)]
auto merge of #13257 : alexcrichton/rust/index-uint, r=pnkfelix

The details are outlined in the first commit.

Closes #10453

10 years agoFix fallout of requiring uint indices
Alex Crichton [Wed, 2 Apr 2014 03:39:26 +0000 (20:39 -0700)]
Fix fallout of requiring uint indices

10 years agorustc: Require that vector indices are uints
Alex Crichton [Wed, 2 Apr 2014 03:34:40 +0000 (20:34 -0700)]
rustc: Require that vector indices are uints

This commit tightens up the restriction on types used to index slices to require
exactly `uint` indices. Previously any integral type was accepted, but this
leads to a few subtle problems:

  * 64-bit indices don't make much sense on 32-bit systems
  * Signed indices for slices used as negative indexing isn't implemented

This was discussed at the recent work week, and also has some discussion on
issue #10453.

Closes #10453

10 years agoutil: ppaux: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:47:40 +0000 (10:47 -0400)]
util: ppaux: remove dead code

10 years agoutil: common: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:47:01 +0000 (10:47 -0400)]
util: common: remove dead code

10 years agomiddle: typeck: rscope: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:46:43 +0000 (10:46 -0400)]
middle: typeck: rscope: remove dead code

10 years agomiddle: typeck: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:46:28 +0000 (10:46 -0400)]
middle: typeck: remove dead code

10 years agomiddle: typeck: infer: resolve: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:45:17 +0000 (10:45 -0400)]
middle: typeck: infer: resolve: remove dead code

10 years agomiddle: typeck: infer: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:44:51 +0000 (10:44 -0400)]
middle: typeck: infer: remove dead code

10 years agomiddle: typeck: infer: lub: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:44:29 +0000 (10:44 -0400)]
middle: typeck: infer: lub: remove dead code

10 years agomiddle: typeck: infer: combine: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:44:00 +0000 (10:44 -0400)]
middle: typeck: infer: combine: remove dead code

10 years agomiddle: typeck: check: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:39:02 +0000 (10:39 -0400)]
middle: typeck: check: remove dead code

10 years agomiddle: ty: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:38:20 +0000 (10:38 -0400)]
middle: ty: remove dead code

10 years agomiddle: trans: type_: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:37:12 +0000 (10:37 -0400)]
middle: trans: type_: remove dead code

10 years agomiddle: trans: tvec: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:33:30 +0000 (10:33 -0400)]
middle: trans: tvec: remove dead code

10 years agomiddle: trans: reflect: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:31:41 +0000 (10:31 -0400)]
middle: trans: reflect: remove dead code

10 years agomiddle: trans: meth: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:31:30 +0000 (10:31 -0400)]
middle: trans: meth: remove dead code

10 years agomiddle: trans: datum: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:29:37 +0000 (10:29 -0400)]
middle: trans: datum: remove dead code

10 years agomiddle: trans: context: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:28:56 +0000 (10:28 -0400)]
middle: trans: context: remove dead code

10 years agomiddle: trans: common: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:28:42 +0000 (10:28 -0400)]
middle: trans: common: remove dead code