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
Alex Crichton
55461d888f
Change the default level of unused_imports to warn
2013-03-04 12:27:01 -05:00
Erick Tryzelaar
85fecd0ba7
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-03-01 07:01:48 -08:00
Patrick Walton
107bf96ff0
librustc: Mark all type implementations public. rs=impl-publicity
2013-02-28 11:32:24 -08:00
Erick Tryzelaar
3953bdd812
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-28 07:25:31 -08:00
Niko Matsakis
c623d21e38
Introduce lifetime declarations into the lists of type parameters.
...
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;
cc #4846
2013-02-27 19:42:09 -05:00
Erick Tryzelaar
7d0ec86c4a
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-27 11:03:21 -08:00
Patrick Walton
c483aab4ae
librustc: Implement a lint mode for mutable structures; deny by default. r=tjc
2013-02-26 04:18:11 -08:00
Erick Tryzelaar
f14409c528
libsyntax: progress on making syntax::visit vecs_implicitly_copyable-free
2013-02-25 07:49:34 -08:00
Erick Tryzelaar
9ac5262bdf
libsyntax: convert visit to pass ty_params by reference
2013-02-25 07:27:01 -08:00
Daniel Micay
1afddff97f
remove oldsmallintmap
...
Closes #4738
2013-02-23 01:40:17 -05:00
Luqman Aden
9ea6a49696
Remove the last bits of structural records from tests/rustc/rusti/rustpkg.
2013-02-21 15:19:40 -08:00
Patrick Walton
bf2a225c0b
librustc: Separate most trait bounds with '+'. rs=plussing
2013-02-20 21:14:20 -08:00
Tim Chevalier
0c3290a217
Merge
2013-02-20 18:45:50 -08:00
Luqman Aden
6282e5da67
librustc: tidy
2013-02-20 18:45:50 -08:00
Luqman Aden
cd82c4566b
librustc: Get rid of structural records save for front/test.rs.
2013-02-20 18:45:50 -08:00
Erick Tryzelaar
b90ccc9a38
librustc: minor cleanup
2013-02-19 10:02:52 -08:00
Erick Tryzelaar
ae86c03af2
librustc: change check_item_non_camel_case_types to not copy
2013-02-19 10:02:52 -08:00
Erick Tryzelaar
53951afe48
librustc: convert lint_dict to take @~strs as keys
2013-02-19 10:02:52 -08:00
Erick Tryzelaar
de5fdaf934
convert ast::meta_items to take @~strs
2013-02-19 10:02:52 -08:00
Patrick Walton
9143688197
librustc: Replace impl Type : Trait
with impl Trait for Type
. rs=implflipping
2013-02-14 14:44:12 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
bors
d6442e97a5
auto merge of #4854 : thestinger/rust/oldmap, r=catamorphism
2013-02-09 15:02:51 -08:00
Daniel Micay
a32c5c73ee
oldmap: get rid of legacy _ref suffixes
2013-02-08 19:12:51 -05:00
Niko Matsakis
a380df809c
Fix subtle error in caching during kind computation that could cause linear
...
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
2013-02-08 07:20:39 -08:00
Niko Matsakis
a32498d846
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
...
correct handling of moves for struct-record update.
Part of #3678 . Fixes #2828 , #3904 , #4719 .
2013-02-07 05:53:30 -08:00
Patrick Walton
801f3225b2
oldmap: use &K instead of K in find and get
...
This reverts commit a4250a96fd
.
This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd
Revert "oldmap: use &K instead of K in find and get"
...
This reverts commit 8e643525d4
.
2013-02-05 14:30:53 -08:00
Daniel Micay
8e643525d4
oldmap: use &K instead of K in find and get
2013-02-03 23:30:56 -05:00
Daniel Micay
81b4f36d49
oldmap: remove legacy each method
2013-02-03 15:55:11 -05:00
Daniel Micay
319eeb1c79
rename map -> oldmap and mark it as deprecated
...
LinearMap is quite a bit faster, and is fully owned/sendable without
requiring copies. The older std::map also doesn't use explicit self and
relies on mutable fields.
2013-02-03 15:55:10 -05:00
John Clements
53688addaa
test cases, cleanup
2013-01-31 23:05:12 -08:00
Daniel Micay
70855f5a07
move smallintmap to oldsmallintmap
2013-01-31 23:13:56 -05:00
Nick Desaulniers
aee7929469
Replace most invocations of fail keyword with die! macro
2013-01-31 20:12:49 -08:00
Niko Matsakis
0682ad0eb9
Finalize moves-based-on-type implementation.
...
Changes:
- Refactor move mode computation
- Removes move mode arguments, unary move, capture clauses
(though they still parse for backwards compatibility)
- Simplify how moves are handled in trans
- Fix a number of illegal copies that cropped up
- Workaround for bug involving def-ids in params
(see details below)
Future work (I'll open bugs for these...):
- Improve error messages for moves that are due
to bindings
- Add support for moving owned content like a.b.c
to borrow check, test in trans (but I think it'll
"just work")
- Proper fix for def-ids in params
Def ids in params:
Move captures into a map instead of recomputing.
This is a workaround for a larger bug having to do with the def-ids associated
with ty_params, which are not always properly preserved when inlining. I am
not sure of my preferred fix for the larger bug yet. This current fix removes
the only code in trans that I know of which relies on ty_param def-ids, but
feels fragile.
2013-01-31 12:09:00 -08:00
Patrick Walton
ae50912875
librustc: De-export rustc. rs=deexporting
2013-01-30 13:44:24 -08:00
Patrick Walton
226cd68f13
librustc: De-implicit-self the visitor. r=graydon
2013-01-29 10:43:12 -08:00
Tim Chevalier
15871a7458
rustc: Check struct field types when heap memory lint checks are enabled
2013-01-28 19:41:56 -08:00
Tim Chevalier
6cbccc92b7
rustc: In lint, forbid structural records unless legacy_records is on
2013-01-28 19:41:55 -08:00
Daniel Micay
e4337a9def
remove remaining is_not_empty functions/methods
2013-01-24 23:24:57 -05:00
Tim Chevalier
c3f4f654eb
comments: Convert XXXes to FIXMEs
2013-01-24 18:49:51 -08:00
Erick Tryzelaar
e84576b888
convert most of libstd over to structs
2013-01-24 16:24:31 -08:00
Erick Tryzelaar
8a3a1fc148
convert ast::expr into a struct
2013-01-20 14:08:18 -08:00
Patrick Walton
a0c2a9b743
librustc: Implement a #[no_mangle] attribute to suppress name mangling. r=brson
...
This is very helpful for SDL, as SDL wants you to define a function named
`SDL_main`.
2013-01-10 21:44:59 -08:00
Niko Matsakis
2b92962aa2
A collection of refactorings that I found it hard/tiresome to divide:
...
- Make `extern fn()` assignable to any closure type, rather than
a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns. This is both
eliminating use of deprecated features and more forwards compatible
with fn reform.
r=pcwalton
2013-01-09 14:59:07 -08:00
Erick Tryzelaar
93c2ebf994
syntax: convert ast::spanned into a struct
2013-01-09 08:55:36 -08:00
Patrick Walton
2db3abddcd
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
...
This reverts commit a8d37af247
.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 19:27:57 -08:00
Niko Matsakis
9f7dc1cb33
Remove ret_style and instead check whether fn return type is bot
...
cc #3681
2013-01-08 14:21:06 -08:00
Patrick Walton
53f41f07ce
librustc: Make vectors no longer implicitly copyable in rustc. r=graydon
...
~20% perf win for trans on -O0, with other minor improvements across the board.
No effect on -O2.
2013-01-07 14:17:36 -08:00
Patrick Walton
fa96740923
librustc: Remove some string allocations. rs=perf
2013-01-05 19:33:37 -08:00
Patrick Walton
57c599914a
librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon
2012-12-27 10:02:54 -08:00
Brian Anderson
23564574ac
Change the default_methods lint mode from forbid to deny to fix tests
2012-12-17 20:41:12 -08:00
Patrick Walton
ebd9ad4d04
librustc: Add a lint mode for deprecated self. r=brson
2012-12-14 19:46:55 -08:00
Patrick Walton
8a9ccf81b0
librustc: Implement a lint mode for default methods. r=brson
2012-12-14 19:28:43 -08:00
Patrick Walton
99fa9c3cab
Revert "librustc: Implement a lint mode for default methods"
...
This reverts commit 53b181dd47
.
2012-12-14 19:13:59 -08:00
Patrick Walton
53b181dd47
librustc: Implement a lint mode for default methods
2012-12-14 19:07:20 -08:00
Tim Chevalier
94a76843f4
Revert "Merge pull request #4144 from luqmana/deprecated-attribute"
...
This reverts commit f675b97ddc
, reversing
changes made to e7dd3af970
.
2012-12-11 12:28:30 -08:00
Tim Chevalier
1abad3b4e6
Fix whitespace
2012-12-11 11:42:44 -08:00
Tim Chevalier
f675b97ddc
Merge pull request #4144 from luqmana/deprecated-attribute
...
Add deprecated attribute.
2012-12-10 21:16:20 -08:00
Tim Chevalier
0046ed9462
Remove un-needed code for obsolete classes
...
and rename "class" to "struct" everywhere possible (except local
vars, I was too lazy for that) -- that is why this commit is so
big.
No review, just dead code removal and renaming.
Closes #3515
2012-12-10 18:45:01 -08:00
Luqman Aden
4b4c8331bb
Add deprecated attribute.
2012-12-09 02:26:12 -05:00
Patrick Walton
98fdcb0b9d
librustc: De-mode pattern bindings. r=nmatsakis
2012-12-07 19:34:57 -08:00
Patrick Walton
f02e9db212
librustc: Remove bogus ValueMode. rs=tree-on-fire
2012-12-04 15:09:40 -08:00
Patrick Walton
56ece46f7d
librustc: Remove all legacy pattern bindings from libsyntax and librustc. rs=refactoring
2012-12-04 14:19:19 -08:00
Graydon Hoare
00c856c0b1
Update license, add license boilerplate to most files. Remainder will follow.
2012-12-03 17:12:14 -08:00
Brian Anderson
8179e268ef
Register snapshots
2012-11-28 12:33:00 -08:00
Patrick Walton
318e534895
rustc: Implement explicit self for Eq and Ord. r=graydon
2012-11-19 15:33:11 -08:00
Brian Anderson
69a8b4d8e2
Rename src/rustc to src/librustc. Use the driver crate
2012-11-07 13:53:39 -08:00