Alex Crichton
4d44abd52a
Change lints to indicate exactly where the level was set
2013-05-17 00:54:03 -04:00
Alex Crichton
1daaf785ab
Optimize lint passes to perform far fewer allocations
...
Achieves ~3x speedup on lint passes for libcore
2013-05-17 00:49:17 -04: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
Alex Crichton
5614e83e81
Remove vecs_implicitly_copyable from the compiler
2013-05-14 12:25:18 -04:00
bors
7a4c6e587d
auto merge of #6325 : sammykim/rust/lint-name, r=graydon
...
Fix #3525 .
2013-05-09 08:54:38 -07:00
Patrick Walton
3affc6ed40
librustc: Fix merge fallout.
2013-05-08 17:04:02 -07:00
Patrick Walton
db4573a776
librustc: Remove mutable fields from the language.
...
They're still parsed though, to get through bootstrapping.
2013-05-08 17:04:00 -07:00
Sangeun Kim
dc48a558b6
Show lint names
2013-05-08 17:23:48 +09:00
bors
86500fbb13
auto merge of #6297 : sammykim/rust/static-lint-table, r=luqmana
2013-05-07 23:18:39 -07:00
Sangeun Kim
356ebe8792
extranous thing is removed
2013-05-08 10:42:47 +09:00
Sangeun Kim
7455f986a8
Make lint_table static
2013-05-07 16:28:58 +09:00
Niko Matsakis
4300d4d2fa
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
...
Conflicts:
src/libcore/core.rc
src/libcore/hashmap.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/num.rs
src/libcore/num/strconv.rs
src/libcore/num/uint-template.rs
src/libcore/ops.rs
src/libcore/os.rs
src/libcore/prelude.rs
src/libcore/rt/mod.rs
src/libcore/unstable/lang.rs
src/librustc/driver/session.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/gather_loans.rs
src/librustc/middle/borrowck/loan.rs
src/librustc/middle/borrowck/preserve.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/region.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/inline.rs
src/librustc/middle/trans/reachable.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/regionck.rs
src/librustc/util/ppaux.rs
src/libstd/arena.rs
src/libstd/ebml.rs
src/libstd/json.rs
src/libstd/serialize.rs
src/libstd/std.rc
src/libsyntax/ast_map.rs
src/libsyntax/parse/parser.rs
src/test/compile-fail/borrowck-uniq-via-box.rs
src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs
src/test/run-pass/borrowck-nested-calls.rs
2013-05-05 15:11:04 -04:00
Niko Matsakis
0b0b8018a6
add warning for #6248 and remove instances of it
2013-05-05 12:17:59 -04:00
bors
b42ea7f9ef
auto merge of #6174 : sanxiyn/rust/static-string, r=brson
2013-05-01 22:06:37 -07:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Seo Sanghyeon
4294aed01b
Use static strings
2013-05-02 10:36:30 +09:00
Erick Tryzelaar
c2e1f47955
rustc: remove the rest of drop
...
Removes:
ast::struct_def::dtor
syntax::ast::ii_dtor
syntax::visit::fk_dtor
syntax::ast_map::node_dtor
syntax:struct_dtor
2013-05-01 07:49:41 -07:00
Patrick Walton
f30f54e9d0
librustc: Remove the concept of modes from the compiler.
...
This commit does not remove `ty::arg`, although that should be
possible to do now.
2013-04-29 14:30:55 -07:00
Daniel Micay
f792baba42
only use #[no_core] in libcore
2013-04-27 21:34:24 -04:00
Alex Crichton
8884c6abdb
Use backticks for the unsafe keyword in error messages
2013-04-23 02:06:47 -04:00
Alex Crichton
d1985c9dd0
Implement a lint mode to deal with unused 'mut' variables
2013-04-20 21:02:38 -04:00
Alex Crichton
3c2a44b60f
Don't warn about unsafe functions which don't need to be unsafe
2013-04-20 15:52:05 -04:00
Alex Crichton
1e4a439f7f
rustc: de-mode + fallout from libsyntax changes
2013-04-19 23:23:23 -04:00
Alex Crichton
4bfa3c6663
Add a lint mode for unused unsafe blocks/functions
2013-04-14 01:15:46 -04:00
Niko Matsakis
5606fc0c90
Revert map.each to something which takes two parameters
...
rather than a tuple. The current setup iterates over
`BaseIter<(&'self K, &'self V)>` where 'self is a lifetime declared
*in the each method*. You can't place such a type in
the impl declaration. The compiler currently allows it,
but this will not be legal under #5656 and I'm pretty sure
it's not sound now.
2013-04-10 07:51:48 -07:00
Alex Crichton
3e67085d7a
Allow lint modes to be used on unused variables and dead assignments
2013-04-09 13:48:44 -04:00
Niko Matsakis
d28f734412
Refactor so that references to traits are not represented using a type with a
...
bare function store (which is not in fact a kind of value) but rather
ty::TraitRef. Removes many uses of fail!() and other telltale signs of
type-semantic mismatch.
cc #4183 (not a fix, but related)
2013-04-05 05:36:02 -04:00
Daniel Micay
cc148b58ff
rename Linear{Map,Set} => Hash{Map,Set}
2013-04-03 10:30:36 -04:00
Daniel Micay
44029a5bbc
hashmap: rm linear namespace
2013-04-03 10:30:18 -04:00
Brian Anderson
e3327d3833
Fix warnings
2013-03-31 20:22:47 -07:00
Niko Matsakis
6965fe4bce
Add AbiSet and integrate it into the AST.
...
I believe this patch incorporates all expected syntax changes from extern
function reform (#3678 ). You can now write things like:
extern "<abi>" fn foo(s: S) -> T { ... }
extern "<abi>" mod { ... }
extern "<abi>" fn(S) -> T
The ABI for foreign functions is taken from this syntax (rather than from an
annotation). We support the full ABI specification I described on the mailing
list. The correct ABI is chosen based on the target architecture.
Calls by pointer to C functions are not yet supported, and the Rust type of
crust fns is still *u8.
2013-03-29 18:36:20 -07:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Alex Crichton
be57d745d2
Removing unused imports
2013-03-28 23:56:46 -04:00
Patrick Walton
8b56a8380b
librustc: Modify all code to use new lifetime binder syntax
2013-03-26 21:30:17 -07:00
Alex Crichton
6f812fef1b
rustc: Remove uses of oldmap::HashMap
2013-03-26 19:21:04 -04:00
Patrick Walton
e7c60c141b
librustc: Remove pure
from libsyntax and librustc.
2013-03-22 12:57:27 -07:00
Andrew Paseltiner
9966eaaba4
rustc: replace uses of old deriving attribute with new one
2013-03-22 06:24:19 -04:00
Marvin Löbel
9d9a209e9a
back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> slice_unique
2013-03-21 14:05:57 +01:00
Marvin Löbel
a7d296f24c
renamed str::view -> slice_DBG_BRWD
...
renamed str::slice -> slice_DBG_UNIQ
changed vec slice method -> to_owned()
renamed vec view method -> slice_V_DBG_BRWD
2013-03-21 01:50:32 +01:00
Alex Crichton
3fac7cce8f
rustc: Remove some bad copies throughout
2013-03-20 01:28:32 -04:00
Luqman Aden
787f5bb0db
Now actually allow using constants in those constant expressions for [T * n].
2013-03-18 17:31:41 -07:00
Patrick Walton
352c070365
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
2013-03-18 17:21:14 -07:00
Patrick Walton
8fa66e8e07
librustc: Remove implicit self from the language, except for old-style drop blocks.
2013-03-13 20:07:10 -07:00
Niko Matsakis
852619d5d7
Remove ++
mode from the compiler (it is parsed as +
mode)
...
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-13 17:00:09 -04:00
Niko Matsakis
efc7f82bc4
Revamp foreign code not to consider the Rust modes. This requires
...
adjusting a few foreign functions that were declared with by-ref
mode. This also allows us to remove by-val mode in the near future.
With copy mode, though, we have to be careful because Rust will implicitly pass
somethings by pointer but this may not be the C ABI rules. For example, rust
will pass a struct Foo as a Foo*. So I added some code into the adapters to
fix this (though the C ABI rules may put the pointer back, oh well).
This patch also includes a lint mode for the use of by-ref mode
in foreign functions as the semantics of this have changed.
2013-03-13 16:59:37 -04:00
Patrick Walton
08c840205e
librustc: Lint the old drop
destructor notation off
2013-03-11 09:36:00 -07:00
Patrick Walton
d18f785457
librustc: Replace all uses of fn()
with &fn()
. rs=defun
2013-03-11 09:35:58 -07:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
Patrick Walton
954ae9c975
libsyntax: Remove struct literal expressions from the compiler
2013-03-07 22:32:55 -08:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00