]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoAuto merge of #26682 - posix4e:netbsd, r=alexcrichton
bors [Thu, 2 Jul 2015 18:50:46 +0000 (18:50 +0000)]
Auto merge of #26682 - posix4e:netbsd, r=alexcrichton

This is dependent on https://github.com/rust-lang/rust-installer/pull/38. Once it is merged we most likely need to update the commit.

9 years agoAuto merge of #26724 - tshepang:patch-1, r=bluss
bors [Thu, 2 Jul 2015 15:57:30 +0000 (15:57 +0000)]
Auto merge of #26724 - tshepang:patch-1, r=bluss

Also, the info is repeated in the following paragraph

9 years agoAuto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth
bors [Thu, 2 Jul 2015 14:23:02 +0000 (14:23 +0000)]
Auto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth

r? @Manishearth

9 years agoAuto merge of #26715 - steveklabnik:gh26497, r=huonw
bors [Thu, 2 Jul 2015 12:28:11 +0000 (12:28 +0000)]
Auto merge of #26715 - steveklabnik:gh26497, r=huonw

Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497

9 years agoAuto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth
bors [Thu, 2 Jul 2015 10:51:50 +0000 (10:51 +0000)]
Auto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth

Part of #24407.
cc @michaelsproul
r? @Manishearth

9 years agoAuto merge of #26727 - remram44:coerceunsized-weak, r=eddyb
bors [Thu, 2 Jul 2015 09:19:27 +0000 (09:19 +0000)]
Auto merge of #26727 - remram44:coerceunsized-weak, r=eddyb

This is a simple addition, shouldn't change behavior.

Fixes #26704

I don't know if the coercion for `Rc` is tested, if it is this probably needs the same test with `Weak`.

9 years agoAuto merge of #26722 - arielb1:log-deadlock, r=eddyb
bors [Thu, 2 Jul 2015 07:47:29 +0000 (07:47 +0000)]
Auto merge of #26722 - arielb1:log-deadlock, r=eddyb

These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.

r? @eddyb

9 years agoAuto merge of #26718 - nham:test-8640, r=alexcrichton
bors [Thu, 2 Jul 2015 06:14:54 +0000 (06:14 +0000)]
Auto merge of #26718 - nham:test-8640, r=alexcrichton

This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR https://github.com/rust-lang/rust/pull/19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.

9 years agoAuto merge of #26691 - nrc:mem, r=alexcrichton
bors [Thu, 2 Jul 2015 04:42:50 +0000 (04:42 +0000)]
Auto merge of #26691 - nrc:mem, r=alexcrichton

Reports the resident set size after each pass (linux-only).

r? @huonw or @alexcrichton

9 years agoAuto merge of #26677 - jroesch:fulfillment-context-refactor, r=nrc
bors [Thu, 2 Jul 2015 03:10:25 +0000 (03:10 +0000)]
Auto merge of #26677 - jroesch:fulfillment-context-refactor, r=nrc

This patch implements the next chunk of flattening out the type checking context. In a series of patches I moved around the necessary state and logic in order to delete the `Typer` and `ClosureTyper` traits. My next goal is to clean the interfaces and start to move the normalization code behind them.

r? @nrc I hope my PR is coherent, doing this too late at night ;)

9 years agoUpdate librustc_driver/test.rs
Jared Roesch [Thu, 2 Jul 2015 02:29:17 +0000 (19:29 -0700)]
Update librustc_driver/test.rs

9 years agoAdd netbsd amd64 support
Alex Newman [Wed, 1 Jul 2015 03:37:11 +0000 (20:37 -0700)]
Add netbsd amd64 support

9 years agoAuto merge of #26688 - nrc:map-parent-2, r=manishearth
bors [Thu, 2 Jul 2015 01:40:28 +0000 (01:40 +0000)]
Auto merge of #26688 - nrc:map-parent-2, r=manishearth

r? @Manishearth

9 years agoImplement CoerceUnsized for arc::Weak
Remi Rampin [Wed, 1 Jul 2015 21:58:05 +0000 (17:58 -0400)]
Implement CoerceUnsized for arc::Weak

9 years agoAdd test to dst-coerce-rc.rs
Remi Rampin [Wed, 1 Jul 2015 21:54:54 +0000 (17:54 -0400)]
Add test to dst-coerce-rc.rs

9 years agoReport memory use in time-passes
Nick Cameron [Sun, 28 Jun 2015 01:37:33 +0000 (18:37 -0700)]
Report memory use in time-passes

Reports the resident set size after each pass (linux-only).

9 years agodoc: there is just one trait in here
Tshepang Lekhonkhobe [Wed, 1 Jul 2015 21:05:06 +0000 (23:05 +0200)]
doc: there is just one trait in here

Also, the info is repeated in the following paragraph

9 years agoRefactoring
Nick Cameron [Tue, 30 Jun 2015 20:58:48 +0000 (08:58 +1200)]
Refactoring

9 years agoFix deadlocks with RUST_LOG=rustc::middle::ty
Ariel Ben-Yehuda [Wed, 1 Jul 2015 20:07:26 +0000 (23:07 +0300)]
Fix deadlocks with RUST_LOG=rustc::middle::ty

These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.

9 years agoAddress nits
Jared Roesch [Wed, 1 Jul 2015 20:08:25 +0000 (13:08 -0700)]
Address nits

9 years agoImplement CoerceUnsized for rc::Weak
Remi Rampin [Wed, 1 Jul 2015 19:51:17 +0000 (15:51 -0400)]
Implement CoerceUnsized for rc::Weak

Fixes #26704

9 years agoAuto merge of #26658 - alexcrichton:windows-net-no-inherit, r=aturon
bors [Wed, 1 Jul 2015 19:28:15 +0000 (19:28 +0000)]
Auto merge of #26658 - alexcrichton:windows-net-no-inherit, r=aturon

This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.

Closes #26543

9 years agoAuto merge of #26034 - Gankro:deprecate-bits, r=alexcrichton
bors [Wed, 1 Jul 2015 17:55:20 +0000 (17:55 +0000)]
Auto merge of #26034 - Gankro:deprecate-bits, r=alexcrichton

I've mirrored them out to crates (bit-vec and bit-set) that build on stable.

(not sure if this actually correctly deprecates them in std)

9 years agofallout of bitvec/bitset deprecation
Alexis Beingessner [Tue, 30 Jun 2015 23:41:00 +0000 (16:41 -0700)]
fallout of bitvec/bitset deprecation

9 years agoAdd a regression test for #8640.
Nick Hamann [Wed, 1 Jul 2015 17:22:42 +0000 (12:22 -0500)]
Add a regression test for #8640.

This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR #19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.

9 years agoAdd E0277 error explanation
Guillaume Gomez [Wed, 1 Jul 2015 11:28:26 +0000 (13:28 +0200)]
Add E0277 error explanation

9 years agoAdd examples in error explanation E0267 and E0268
Guillaume Gomez [Wed, 1 Jul 2015 11:37:02 +0000 (13:37 +0200)]
Add examples in error explanation E0267 and E0268

9 years agoExpand docs for recv
Steve Klabnik [Wed, 1 Jul 2015 15:58:51 +0000 (11:58 -0400)]
Expand docs for recv

Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497

9 years agoAuto merge of #26675 - azerupi:doc-js-keyevent, r=alexcrichton
bors [Wed, 1 Jul 2015 16:21:10 +0000 (16:21 +0000)]
Auto merge of #26675 - azerupi:doc-js-keyevent, r=alexcrichton

Like explained in #26016, typing `?` had no effect with non-english keyboard layouts in the docs.

This patch seems to resolve this issue, **tested with AZERTY keyboard in Google Chrome and Firefox**. I haven't tested it with more exotic keyboard layouts or with other browsers though.

This code is based on the information found on: http://javascript.info/tutorial/keyboard-events

**More specifically:**

> The only event which reliably provides the character is keypress.

**And**

>```
// event.type must be keypress
function getChar(event) {
  if (event.which == null) {
    return String.fromCharCode(event.keyCode) // IE
  } else if (event.which!=0 && event.charCode!=0) {
    return String.fromCharCode(event.which)   // the rest
  } else {
    return null // special key
  }
}
```

`?` and `S` work, `escape` however does not (on an Azerty keyboard).

It would be good if some people could test it with other browsers and keyboard layouts: http://www.mathieudavid.org/test/rustdoc/std/index.html

**Edit:**
- swedish layout works on Firefox and Chromium
- french (azerty) mac layout works on Safari

9 years agoAuto merge of #26711 - bluss:doc-hide-rand, r=steveklabnik
bors [Wed, 1 Jul 2015 13:39:57 +0000 (13:39 +0000)]
Auto merge of #26711 - bluss:doc-hide-rand, r=steveklabnik

A follow up to #26530, hide SampleRange too. The numerical types implement this trait.

9 years agoAdd E0124 error explanation
Guillaume Gomez [Wed, 1 Jul 2015 11:07:29 +0000 (13:07 +0200)]
Add E0124 error explanation

9 years agoHide SampleRange trait from docs
Ulrik Sverdrup [Wed, 1 Jul 2015 10:05:57 +0000 (12:05 +0200)]
Hide SampleRange trait from docs

9 years agoAuto merge of #26540 - oli-obk:issue11715, r=nrc
bors [Wed, 1 Jul 2015 08:49:17 +0000 (08:49 +0000)]
Auto merge of #26540 - oli-obk:issue11715, r=nrc

closes #25037
closes #11715

r? @nrc

9 years agoIn js from the docs, change keyboard eventlistener to be compatible with non-english...
Mathieu David [Tue, 30 Jun 2015 07:32:15 +0000 (09:32 +0200)]
In js from the docs, change keyboard eventlistener to be compatible with non-english keyboard layouts. Fixes #26016 Fixes #16572

9 years agoAuto merge of #26703 - nrc:dxr-servo-fix, r=huonw
bors [Wed, 1 Jul 2015 07:04:53 +0000 (07:04 +0000)]
Auto merge of #26703 - nrc:dxr-servo-fix, r=huonw

r? @huonw

9 years agostd: Avoid the WSA_FLAG_NO_HANDLE_INHERIT option
Alex Crichton [Mon, 29 Jun 2015 16:46:35 +0000 (09:46 -0700)]
std: Avoid the WSA_FLAG_NO_HANDLE_INHERIT option

This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.

Closes #26543

9 years agosave-analysis: skip generated content in patterns
Nick Cameron [Wed, 1 Jul 2015 03:53:08 +0000 (15:53 +1200)]
save-analysis: skip generated content in patterns

9 years agoAuto merge of #26698 - alexcrichton:char-fmt, r=huonw
bors [Wed, 1 Jul 2015 03:35:46 +0000 (03:35 +0000)]
Auto merge of #26698 - alexcrichton:char-fmt, r=huonw

This recently regressed in #24689, and this updates the `Display` implementation
to take formatting flags into account.

Closes #26625

9 years agostd: Fix formatting flags for chars
Alex Crichton [Wed, 1 Jul 2015 02:26:03 +0000 (19:26 -0700)]
std: Fix formatting flags for chars

This recently regressed in #24689, and this updates the `Display` implementation
to take formatting flags into account.

Closes #26625

9 years agoAuto merge of #26696 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 30 Jun 2015 23:46:57 +0000 (23:46 +0000)]
Auto merge of #26696 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26373, #26506, #26580, #26622, #26627, #26651, #26678, #26692
- Failed merges:

9 years agoAuto merge of #26686 - arielb1:associated-type-defaults-actually-work, r=eddyb
bors [Tue, 30 Jun 2015 21:39:46 +0000 (21:39 +0000)]
Auto merge of #26686 - arielb1:associated-type-defaults-actually-work, r=eddyb

Fixes #26636.

r? @eddyb

9 years agoAuto merge of #26663 - Eljay:fix-repr-attribute, r=sanxiyn
bors [Tue, 30 Jun 2015 20:07:18 +0000 (20:07 +0000)]
Auto merge of #26663 - Eljay:fix-repr-attribute, r=sanxiyn

Fixes #26646.

Loops over all `#[repr(..)]` attributes instead of stopping at the first one to make sure they are all marked as used. Previously it stopped after the first `#[repr(C)]` was found causing all other attributes to be skipped by the linter.

9 years agoRollup merge of #26692 - steveklabnik:gh26620, r=alexcrichton
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26692 - steveklabnik:gh26620, r=alexcrichton

Fixes #26620

9 years agoMake note of Ord's derive ordering
Steve Klabnik [Tue, 30 Jun 2015 22:46:31 +0000 (18:46 -0400)]
Make note of Ord's derive ordering

Fixes #26620

9 years agoRollup merge of #26678 - bluss:doc-fmt, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26678 - bluss:doc-fmt, r=steveklabnik

fmt: Update docs and mention :#? pretty-printing

Expose `:#?` well in the docs for fmt and Debug itself. Also update some out of date information and fix formatting in `std::fmt` docs.

9 years agoRollup merge of #26651 - GuillaumeGomez:patch-2, r=Manishearth
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26651 - GuillaumeGomez:patch-2, r=Manishearth

Part of #24407.
cc @michaelsproul
r? @Manishearth

9 years agoRollup merge of #26627 - tshepang:stdin-example, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26627 - tshepang:stdin-example, r=steveklabnik

9 years agoRollup merge of #26622 - tshepang:indents, r=sanxiyn
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26622 - tshepang:indents, r=sanxiyn

9 years agoRollup merge of #26580 - adamheins:master, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26580 - adamheins:master, r=steveklabnik

I found a sentence that felt a bit awkward to read in its current form, so I added a comma to break it up.

9 years agoRollup merge of #26506 - tshepang:doc-fix, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26506 - tshepang:doc-fix, r=steveklabnik

9 years agoRollup merge of #26373 - tshepang:patch-2, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26373 - tshepang:patch-2, r=steveklabnik

9 years agoActually encode default associated types
Ariel Ben-Yehuda [Tue, 30 Jun 2015 19:03:25 +0000 (22:03 +0300)]
Actually encode default associated types

Fixes #26636

9 years agoAuto merge of #26327 - bluss:two-way, r=aturon
bors [Tue, 30 Jun 2015 18:09:51 +0000 (18:09 +0000)]
Auto merge of #26327 - bluss:two-way, r=aturon

Update substring search to use the Two Way algorithm

To improve our substring search performance, revive the two way searcher
and adapt it to the Pattern API.

Fixes #25483, a performance bug: that particular case now completes faster
in optimized rust than in ruby (but they share the same order of magnitude).

Many thanks to @gereeter who helped me understand the reverse case
better and wrote the comment explaining `next_back` in the code.

I had quickcheck to fuzz test forward and reverse searching thoroughly.

The two way searcher implements both forward and reverse search,
but not double ended search. The forward and reverse parts of the two
way searcher are completely independent.

The two way searcher algorithm has very small, constant space overhead,
requiring no dynamic allocation. Our implementation is relatively fast,
especially due to the `byteset` addition to the algorithm, which speeds
up many no-match cases.

A bad case for the two way algorithm is:

```
let haystack = (0..10_000).map(|_| "dac").collect::<String>();
let needle = (0..100).map(|_| "bac").collect::<String>());
```

For this particular case, two way is not much faster than the naive
implementation it replaces.

9 years agodoc: add example for Stdin::read_line
Tshepang Lekhonkhobe [Sat, 27 Jun 2015 20:58:49 +0000 (22:58 +0200)]
doc: add example for Stdin::read_line

9 years agoDeprecate BitSet and BitVec in favour of bit-vec and bit-set crates in cargo
Alexis Beingessner [Fri, 5 Jun 2015 19:43:32 +0000 (12:43 -0700)]
Deprecate BitSet and BitVec in favour of bit-vec and bit-set crates in cargo

9 years agoAdd E0119 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 10:35:01 +0000 (12:35 +0200)]
Add E0119 error explanation

Add more explanations

9 years agoAdd E0207 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 10:12:45 +0000 (12:12 +0200)]
Add E0207 error explanation

9 years agoAdd E0117 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 09:57:47 +0000 (11:57 +0200)]
Add E0117 error explanation

9 years agoAdd E0101 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 09:19:16 +0000 (11:19 +0200)]
Add E0101 error explanation

9 years agoAdd E0092 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:58:52 +0000 (10:58 +0200)]
Add E0092 error explanation

9 years agoAdd E0211 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:47:49 +0000 (10:47 +0200)]
Add E0211 error explanation

9 years agoAdd E0094 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:44:20 +0000 (10:44 +0200)]
Add E0094 error explanation

9 years agoAdd E0093 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:35:46 +0000 (10:35 +0200)]
Add E0093 error explanation

9 years agoAdd E0195 error explanation
Guillaume Gomez [Mon, 29 Jun 2015 14:00:57 +0000 (16:00 +0200)]
Add E0195 error explanation

9 years agoAuto merge of #26669 - frewsxcv:diagnostics-https, r=huonw
bors [Tue, 30 Jun 2015 15:13:05 +0000 (15:13 +0000)]
Auto merge of #26669 - frewsxcv:diagnostics-https, r=huonw

None

9 years agoAuto merge of #26664 - steveklabnik:gh26571, r=alexcrichton
bors [Tue, 30 Jun 2015 12:54:16 +0000 (12:54 +0000)]
Auto merge of #26664 - steveklabnik:gh26571, r=alexcrichton

This was pretty misleading, so let's improve.

Fixes #26571

9 years agofmt: Update docs and mention :#? pretty-printing
Ulrik Sverdrup [Tue, 30 Jun 2015 12:10:24 +0000 (14:10 +0200)]
fmt: Update docs and mention :#? pretty-printing

9 years agoAuto merge of #26662 - steveklabnik:gh26661, r=alexcrichton
bors [Tue, 30 Jun 2015 10:26:09 +0000 (10:26 +0000)]
Auto merge of #26662 - steveklabnik:gh26661, r=alexcrichton

This is his own mirror, so it shouldn't go down, unlike the previous one.

Fixes #26661

9 years agoClean up patch
Jared Roesch [Tue, 30 Jun 2015 09:39:47 +0000 (02:39 -0700)]
Clean up patch

9 years agoRemove Typer and ClosureTyper
Jared Roesch [Tue, 30 Jun 2015 09:18:03 +0000 (02:18 -0700)]
Remove Typer and ClosureTyper

This commit finalizes the work of the past commits by fully moving the fulfillment context into
the InferCtxt, cleaning up related context interfaces, removing the Typer and ClosureTyper
traits and cleaning up related intefaces

9 years agoRemove Typer + ClosureTyper impls for BlockS
Jared Roesch [Tue, 30 Jun 2015 00:46:24 +0000 (17:46 -0700)]
Remove Typer + ClosureTyper impls for BlockS

9 years agoRemove Typer + ClosureTyper impls for ParameterEnv
Jared Roesch [Mon, 29 Jun 2015 06:03:47 +0000 (23:03 -0700)]
Remove Typer + ClosureTyper impls for ParameterEnv

9 years agoRemove NormalizingClosureTyper
Jared Roesch [Sun, 28 Jun 2015 05:04:15 +0000 (22:04 -0700)]
Remove NormalizingClosureTyper

9 years agoUse fresh FulfillmentContexts in select locations
Jared Roesch [Sun, 28 Jun 2015 00:37:22 +0000 (17:37 -0700)]
Use fresh FulfillmentContexts in select locations

9 years agoUpdate all uses of FulfillmentContext
Jared Roesch [Sun, 28 Jun 2015 00:37:13 +0000 (17:37 -0700)]
Update all uses of FulfillmentContext

Update all uses of FulfillmentContext to be ones obtained via
an InferCtxt. This is another step of flattening the type
checking context into a single piece of state.

9 years agoMove FufillmentContext into InferContext
Jared Roesch [Fri, 26 Jun 2015 19:23:41 +0000 (12:23 -0700)]
Move FufillmentContext into InferContext

9 years agoAuto merge of #26670 - frewsxcv:regression-test-13902, r=alexcrichton
bors [Tue, 30 Jun 2015 08:04:11 +0000 (08:04 +0000)]
Auto merge of #26670 - frewsxcv:regression-test-13902, r=alexcrichton

Closes #13902

9 years agoAlternate method
Nick Cameron [Thu, 25 Jun 2015 22:48:59 +0000 (15:48 -0700)]
Alternate method

9 years agoImplement get_enclosing_scope and use it in save-analysis
Nick Cameron [Tue, 16 Jun 2015 10:20:30 +0000 (22:20 +1200)]
Implement get_enclosing_scope and use it in save-analysis

9 years agoAdd parent_node to ast_map
Nick Cameron [Tue, 16 Jun 2015 09:56:33 +0000 (21:56 +1200)]
Add parent_node to ast_map

9 years agoAuto merge of #26668 - frewsxcv:regression-test-17756, r=alexcrichton
bors [Tue, 30 Jun 2015 03:18:45 +0000 (03:18 +0000)]
Auto merge of #26668 - frewsxcv:regression-test-17756, r=alexcrichton

Closes #17756

9 years agoAuto merge of #26667 - arielb1:audit-walk, r=eddyb
bors [Tue, 30 Jun 2015 01:45:46 +0000 (01:45 +0000)]
Auto merge of #26667 - arielb1:audit-walk, r=eddyb

This was originally motivated by checking for HRTB hygiene, but I found several other bugs on the way.

This does not fix the biggest user of ty_walk, which is dtorck - I would prefer to coordinate that with @pnkfelix.

r? @eddyb

9 years agoAdd regression test for #13902
Corey Farwell [Tue, 30 Jun 2015 00:28:21 +0000 (17:28 -0700)]
Add regression test for #13902

Closes #13902

9 years agoLink to docs from error explanations via HTTPS
Corey Farwell [Tue, 30 Jun 2015 00:23:02 +0000 (17:23 -0700)]
Link to docs from error explanations via HTTPS

9 years agoAuto merge of #26666 - huonw:unc-rec, r=alexcrichton
bors [Tue, 30 Jun 2015 00:14:32 +0000 (00:14 +0000)]
Auto merge of #26666 - huonw:unc-rec, r=alexcrichton

This fixes two false positives for the unconditional recursion lint, when functions use themselves (or almost-themselves) internally, without actually being recursive.

````rust
fn main() { let _ = main; }
```
```rust
trait Bar {
    fn method<T: Bar>(&self, x: &T) {
        x.method(x)
    }
}
```

9 years agoAdd regression test for #17756
Corey Farwell [Tue, 30 Jun 2015 00:10:53 +0000 (17:10 -0700)]
Add regression test for #17756

Closes #17756

9 years agoRemove now-useless code
Ariel Ben-Yehuda [Mon, 29 Jun 2015 23:31:07 +0000 (02:31 +0300)]
Remove now-useless code

9 years agoKill count_late_bound_regions
Ariel Ben-Yehuda [Mon, 29 Jun 2015 23:24:46 +0000 (02:24 +0300)]
Kill count_late_bound_regions

No, it didn't show up in my profiler. It still needs to die.

9 years agolint: default methods must be called on Self to unconditionally recur.
Huon Wilson [Mon, 29 Jun 2015 22:56:00 +0000 (15:56 -0700)]
lint: default methods must be called on Self to unconditionally recur.

This catches the case when a trait defines a default method that calls
itself, but on a type that isn't necessarily `Self`, e.g. there's no
reason that `T = Self` in the following, so the call isn't necessarily
recursive (`T` may override the call).

    trait Bar {
        fn method<T: Bar>(&self, x: &T) {
            x.method(x)
        }
    }

Fixes #26333.

9 years agolint: only consider actual calls as unconditional recursion.
Huon Wilson [Mon, 29 Jun 2015 21:51:56 +0000 (14:51 -0700)]
lint: only consider actual calls as unconditional recursion.

Specifically, just mentioning the function name as a value is fine, as
long as it isn't called, e.g. `fn main() { let _ = main; }`.

Closes #21705.

9 years agoRemove type_needs_unwind_cleanup
Ariel Ben-Yehuda [Mon, 29 Jun 2015 22:34:17 +0000 (01:34 +0300)]
Remove type_needs_unwind_cleanup

After the last @dinosaur went extinct, the check became redundant with
type_needs_drop, except for its bugginess.

Fixes #26655.

9 years agoFix lifetime elision region accounting
Ariel Ben-Yehuda [Mon, 29 Jun 2015 21:32:39 +0000 (00:32 +0300)]
Fix lifetime elision region accounting

This merges accumulate_regions_in_type with ty_fold::collect_regions.
Fixes #26638

9 years agoAuto merge of #26660 - steveklabnik:fix_up_pointers, r=alexcrichton
bors [Mon, 29 Jun 2015 22:22:54 +0000 (22:22 +0000)]
Auto merge of #26660 - steveklabnik:fix_up_pointers, r=alexcrichton

This is a bit outdated.

9 years agoUpdate link to Ousterhout
Steve Klabnik [Mon, 29 Jun 2015 19:31:27 +0000 (15:31 -0400)]
Update link to Ousterhout

This is his own mirror, so it shouldn't go down, unlike the previous one.

Fixes #26661

9 years agoImprove doc for std::mem::drop
Steve Klabnik [Mon, 29 Jun 2015 20:31:06 +0000 (16:31 -0400)]
Improve doc for std::mem::drop

This was pretty misleading, so let's improve.

Fixes #26571

9 years agoAuto merge of #26659 - nagisa:cas-docs, r=alexcrichton
bors [Mon, 29 Jun 2015 20:50:41 +0000 (20:50 +0000)]
Auto merge of #26659 - nagisa:cas-docs, r=alexcrichton

Namely:

* Change parameter `old` to read `current` so it is clearer what the argument refers to (originally
   suggested `expected`, but shot down by Steve);
* Add some formatting and fix some mistakes like referring to the method as `swap` rather than
  `compare_and_swap`.

9 years agoAdd missing trailing newline.
Eljay [Mon, 29 Jun 2015 20:49:15 +0000 (21:49 +0100)]
Add missing trailing newline.

9 years agoAdd test for #26646.
Eljay [Mon, 29 Jun 2015 20:27:10 +0000 (21:27 +0100)]
Add test for #26646.

9 years agoRefine Atomic*::compare_and_swap documentation
Simonas Kazlauskas [Mon, 29 Jun 2015 18:44:40 +0000 (21:44 +0300)]
Refine Atomic*::compare_and_swap documentation

Namely:

* Change parameter `old` to read `current` so it is clearer what the argument refers to (originally
    suggested `expected`, but shot down by Steve);
* Add some formatting and fix some mistakes like referring to the method as `swap` rather than
  `compare_and_swap`.

9 years agoFix incorrect warning about unused repr attributes.
Lee Jeffery [Mon, 29 Jun 2015 19:40:18 +0000 (20:40 +0100)]
Fix incorrect warning about unused repr attributes.