bors
3869f7a99c
auto merge of #6818 : nikomatsakis/rust/irrefut-patterns-refactoring, r=graydon
...
Various bug fixes and simplifications I did as part of a patch to fix `let` patterns.
r? @catamorphism
2013-05-30 19:04:52 -07:00
Niko Matsakis
ce5fd30270
Fix parser test
2013-05-30 21:01:25 -04:00
Graydon Hoare
2bed5dc528
rustc: change 'use' to 'add' in error message, fix #2994
2013-05-30 13:45:53 -07:00
Alex Crichton
4a5d887b58
Allow doc(hidden) and --test to disable doc linting
2013-05-30 01:02:55 -05:00
Alex Crichton
af995ce1e7
Make missing documentation linting more robust
...
Add some more cases for warning about missing documentation, and also add a test
to make sure it doesn't die in the future.
2013-05-30 01:02:55 -05:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Patrick Walton
aeda178011
librustc: Redo the unsafe checker and make unsafe methods not callable from safe code
2013-05-29 19:04:50 -07:00
Niko Matsakis
bf1647c92a
Reconcile docs and code, adding examples and adding RESTR_CLAIM
2013-05-28 20:22:15 -04:00
Niko Matsakis
5851d3242c
Move checking for moves and initialization of local variables and patterns into
...
borrow checker and generalize what moves are allowed. Fixes a nasty
bug or two in the pattern move checking code. Unifies dataflow code
used for initialization and other things. First step towards
once fns. Everybody wins.
Fixes #4384 . Fixes #4715 . cc once fns (#2202 ), optimizing local moves (#5016 ).
2013-05-28 20:22:14 -04:00
bors
9a06ff0590
auto merge of #6707 : catamorphism/rust/issue-5543, r=catamorphism
2013-05-28 14:35:00 -07:00
bors
c33258bee1
auto merge of #6773 : lkuper/rust/alt-to-match, r=thestinger
...
RIP `alt`.
2013-05-28 05:07:59 -07:00
Tim Chevalier
403aee1082
testsuite: Test cases, one xfailed, one not
2013-05-27 17:32:32 -07:00
Lindsey Kuper
32c6199161
Change alt
to match
in filenames.
2013-05-27 17:28:39 -04:00
Lindsey Kuper
c9c4d92889
Add xfail'd test for #6762 .
2013-05-27 15:21:45 -04:00
Olivier Saut
f2125434d8
Remove the get function
...
Rust is now preferring methods over functions and there is no legacy with ARC
2013-05-24 22:51:24 +02:00
Patrick Walton
1be40be613
test: Update tests to use the new syntax.
2013-05-22 21:57:10 -07:00
Patrick Walton
ebfc2b8e56
librustc: Rename core injection to std injection
2013-05-22 21:57:05 -07:00
Patrick Walton
565942b145
librustc: Fix privacy checking for cross-crate variants
2013-05-22 21:57:03 -07:00
Patrick Walton
ca9bb2d9ac
librustc: Disallow use
from reaching into impls or traits.
...
This can perhaps be restored in the future. For now this is a precursor to
making typedefs work as expected.
2013-05-22 21:57:02 -07:00
bors
1d3e84c5d6
auto merge of #6669 : yjh0502/rust/fix_6209, r=graydon
...
Fix issue #6209 , and some related issues about constant expression
- unmatched type between arms
- unmatched type in range
2013-05-22 18:01:36 -07:00
bors
f517ed0b08
auto merge of #6686 : cmr/rust/fix-6596, r=catamorphism
...
The error message is extremely unideal.
2013-05-22 16:22:35 -07:00
Corey Richardson
5118d2f84a
Add test
2013-05-22 19:19:00 -04:00
bors
4bbbae625d
auto merge of #6672 : yjh0502/rust/fix_6342, r=graydon
...
Fix #6342
2013-05-22 11:43:35 -07:00
Corey Richardson
e64339645b
Implement static_assert attribute
...
This verifies that a static item evaluates to true, at compile time.
2013-05-22 13:13:24 -04:00
Jihyun Yu
6c33f5044b
Fix #6342
2013-05-22 16:11:48 +09:00
Jihyun Yu
f8af2b50ee
fix issue #6209
2013-05-22 14:06:25 +09:00
Tim Chevalier
1fadb97b68
testsuite: Update test for #2478 . Still xfailed
2013-05-21 12:58:27 -07:00
bors
329d8e2622
auto merge of #6648 : alexcrichton/rust/issue-6633, r=graydon
...
Resolves #6633 and removes an unnecessary import in libcore
2013-05-21 01:04:16 -07:00
bors
5a3e320514
auto merge of #6647 : alexcrichton/rust/unnecessary-alloc, r=graydon
...
This adds a lint mode for detecting unnecessary allocations on the heap. This isn't super fancy, currently it only has two rules
1. For a function's arguments, if you allocate a `[~|@]str` literal, when the type of the argument is a `&str`, emit a warning.
2. For the same case, emit warnings for boxed vectors when slices are required.
After adding the lint, I rampaged through the libraries and removed all the unnecessary allocations I could find.
2013-05-20 23:55:20 -07:00
bors
32e30aaa00
auto merge of #6576 : nikomatsakis/rust/issue-5362-tuple-indices, r=graydon
...
r? @pcwalton
2013-05-20 18:04:39 -07:00
Alex Crichton
82fa0018c8
Remove all unnecessary allocations (as flagged by lint)
2013-05-20 16:10:40 -05:00
John Clements
b621820dc4
detect unused attrs in one more place, allow parsing to continue for all
...
changed a bunch of fatal()'s into err()'s, to allow parsing to proceed.
2013-05-20 11:49:20 -07:00
Alex Crichton
15f97acdc8
Correctly track the source of imports with the same name
2013-05-20 13:02:08 -05:00
Corey Richardson
cc57ca012a
Use assert_eq! rather than assert! where possible
2013-05-19 08:16:02 -04:00
Daniel Micay
1789174541
minor automated whitespace fixes
2013-05-18 22:40:12 -04:00
Niko Matsakis
5ca383b777
Distinguish tuple elements by index in mem_categorization. Fixes #5362 .
2013-05-17 21:12:50 -04:00
Marvin Löbel
7a2afb7288
Made bytes!() accept a list of string, integer or char literals
2013-05-18 00:26:04 +02:00
Alex Crichton
030c666cc1
Re-implement lint with less emphasis on item ids
...
This way it's much easier to add lints throughout compilation correctly, and
functions on impls can alter the way lints are emitted.
2013-05-17 00:49:16 -04:00
bors
c8159b3e35
auto merge of #6473 : nikomatsakis/rust/issue-5967-rvalue-immutability, r=pcwalton
...
Simpler version of PR #5974 based on new borrowck.
2013-05-16 12:34:40 -07:00
Niko Matsakis
e665fdfc8e
Add two tests for rvalue mutability
2013-05-16 15:10:50 -04:00
Niko Matsakis
035c01af93
Add BuiltinBounds to closure type: parse and handle subtyping,
...
but do not integrate with kindck etc (requires a snapshot first)
2013-05-16 14:21:02 -04:00
bors
8257528b6c
auto merge of #6502 : huonw/rust/no-auto-code, r=graydon
...
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute
and remove the majority of the actual auto_* code, leaving stubs to refer the user to
the new syntax.
Also, moves the useful contents of auto_encode.rs to more appropriate spots: tests and comments to deriving/encodable.rs, and the ExtCtxtMethods trait to build.rs (unused so far, but the method syntax might be nicer than using the mk_* fns in many instances).
2013-05-15 18:16:51 -07:00
bors
7012c42c41
auto merge of #6500 : kud1ing/rust/cleanup, r=bstrie
...
Fixes #6445
2013-05-15 16:07:44 -07:00
Huon Wilson
5dc5efefd4
syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].
...
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute
and remove the majority of the actual code, leaving stubs to refer the user to
the new syntax.
2013-05-16 08:55:57 +10:00
bors
62c7027a32
auto merge of #6485 : cmr/rust/local_rename_import_error, r=catamorphism
2013-05-15 05:43:58 -07:00
Lenny222
017df987b8
remove deriving_eq, deriving_iter_bytes, deriving_clone (deprecated in 0.6)
2013-05-15 10:51:40 +02:00
Corey Richardson
68863153bb
Fix resolution tests
2013-05-14 20:34:12 -04:00
Corey Richardson
62cbea1ca1
Add span to some import resolution errors
2013-05-14 18:52:31 -04:00
Corey Richardson
52f8b22d4f
Add test for resolution errors
2013-05-14 18:51:37 -04:00
Tim Chevalier
be062db808
testsuite: Update and un-xfail unsafe-fn-autoderef
2013-05-14 12:49:21 -07:00