Marvin Löbel
3759b5711d
Fixed typo... And a billion other things.
2013-04-24 22:28:02 +02:00
Marvin Löbel
dd74807957
Removed ascii functions from other modules
...
Replaced str::to_lowercase and str::to_uppercase
2013-04-24 22:26:09 +02:00
Brendan Zabarauskas
ab8068c9f2
Improve divide-by-zero error messages
2013-04-24 14:20:00 +10:00
Alex Crichton
0c2ab662b7
Fixing some various warnings about unused imports
2013-04-23 19:59:14 -04:00
Alex Crichton
4c08a8d6c3
Removing more unnecessary unsafe blocks throughout
2013-04-23 19:59:13 -04:00
Alex Crichton
c089a17854
Improve the unused unsafe block warning to include unsafe blocks in unsafe functions
2013-04-23 19:40:34 -04:00
bors
88ccee78a8
auto merge of #6022 : catamorphism/rust/warning-police, r=catamorphism
2013-04-23 10:36:50 -07:00
Tim Chevalier
7169907e9f
rustc: Remove dead code
2013-04-23 10:17:41 -07:00
Tim Chevalier
aac73b24ae
rustc: Comments only: change XXX to FIXME
2013-04-23 10:17:41 -07:00
Tim Chevalier
52d3f5558e
core, rustc: Warning police
2013-04-23 10:17:38 -07:00
bors
8cadcc47ee
auto merge of #6027 : alexcrichton/rust/more-backticks, r=catamorphism
...
It seems that the general convention of error messages is to have keywords in backticks, so it's probably a good idea to keep doing that.
2013-04-23 09:48:49 -07:00
bors
0290caa885
auto merge of #6026 : isanbard/rust/ca73fbf72615575f106ee18160580711aca89d85, r=catamorphism
...
When the number of parameters is 1, then 'parameter' should remain singular.
Otherwise pluralize it.
2013-04-23 02:33:49 -07:00
Alex Crichton
8884c6abdb
Use backticks for the unsafe keyword in error messages
2013-04-23 02:06:47 -04:00
Bill Wendling
ca73fbf726
Use correct grammar for error message.
...
When the number of parameters is 1, then 'parameter' should remain singular.
Otherwise pluralize it.
2013-04-22 22:08:09 -07:00
bors
b8441ca8a6
auto merge of #6007 : pcwalton/rust/use-mod, r=brson
...
r? @brson
2013-04-22 18:36:50 -07:00
bors
773f7e7560
auto merge of #5996 : sanxiyn/rust/target-feature, r=graydon
...
Fix #1879 .
2013-04-22 17:36:49 -07:00
bors
aba93c6b60
auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydon
...
Closes #3083 .
This takes a similar approach to #5797 where a set is present on the `tcx` of used mutable definitions. Everything is by default warned about, and analyses must explicitly add mutable definitions to this set so they're not warned about.
Most of this was pretty straightforward, although there was one caveat that I ran into when implementing it. Apparently when the old modes are used (or maybe `legacy_modes`, I'm not sure) some different code paths are taken to cause spurious warnings to be issued which shouldn't be issued. I'm not really sure how modes even worked, so I was having a lot of trouble tracking this down. I figured that because they're a legacy thing that I'd just de-mode the compiler so that the warnings wouldn't be a problem anymore (or at least for the compiler).
Other than that, the entire compiler compiles without warnings of unused mutable variables. To prevent bad warnings, #5965 should be landed (which in turn is waiting on #5963 ) before landing this. I figured I'd stick it out for review anyway though.
2013-04-22 15:36:51 -07:00
Patrick Walton
25129ee81c
librustc: Remove use mod
from the language
2013-04-22 12:32:59 -07:00
Jed Davis
22f751f0f3
Use nullable pointers to represent enums like Option<~T>.
...
See comments in adt.rs for details.
2013-04-22 08:50:27 -07:00
Jed Davis
70452e5231
Consider nullability for equivalence of monomorphized fns.
2013-04-22 08:49:56 -07:00
Seo Sanghyeon
da4bc490e6
Choose target features
2013-04-22 20:54:12 +09:00
Seo Sanghyeon
ba1f3c9b1f
Convert to C string inside WriteOutputFile
2013-04-22 20:17:25 +09:00
Brendan Zabarauskas
01eb5e8ad3
Rename Div operator trait to Quot and Modulo operator trait to Rem
2013-04-22 01:58:53 +10:00
Alex Crichton
c389d0b0dd
rustc: remove unused 'mut' variables
2013-04-20 21:03:24 -04:00
Alex Crichton
d1985c9dd0
Implement a lint mode to deal with unused 'mut' variables
2013-04-20 21:02:38 -04:00
bors
0e017ab4e0
auto merge of #5979 : Thiez/rust/no_reinterpret_cast, r=catamorphism
...
As the name suggests this replaces many instances of cast::reinterpret_cast by cast::transmute. It's essentially the boring part of fixing #5163 , the remaining reinterpret_casts should be more tricky to remove (unless I missed a boring case).
r? @catamorphism
2013-04-20 14:24:51 -07:00
bors
f0afe23dce
auto merge of #5978 : alexcrichton/rust/issue-5954, r=catamorphism
...
Closes #5954
2013-04-20 13:33:51 -07:00
Matthijs Hofstra
51a68eb9b1
Replaced many instances of reinterpret_cast with transmute
2013-04-20 22:05:50 +02: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
Huon Wilson
93c0888b6c
librustc: implement and use fixed_stack_segment
attribute for intrinsics.
2013-04-21 01:40:48 +10:00
Alex Crichton
1e4a439f7f
rustc: de-mode + fallout from libsyntax changes
2013-04-19 23:23:23 -04:00
Alex Crichton
be9f4ef65f
Fix an ICE when dereferencing types which cannot be dereferenced
2013-04-19 23:21:52 -04:00
bors
8b3c09a103
auto merge of #5962 : pcwalton/rust/shootout, r=pcwalton
...
r? @brson
2013-04-19 19:24:52 -07:00
Patrick Walton
dcea717208
librustc: Fix botched merge. rs=merge
2013-04-19 15:57:31 -07:00
bors
7d250d3181
auto merge of #5824 : bleibig/rust/debuginfo, r=brson
...
This adds debugging symbol generation for boxes, bare functions, vectors, and strings, along with a tests for boxes and vectors.
Note that gdb will see them as their actual compiled representation with the refcount, tydesc, etc. fields, so if `b` refers to box, `b->boxed` will refer to its value. Also, since you seem to use the [C struct hack](http://c-faq.com/struct/structhack.html ) for dynamic vectors, you won't be able to print out the whole vector at once, only one element at a time by indexing specific elements.
2013-04-19 12:03:49 -07:00
Patrick Walton
f93b3cd5c3
librustc: Remove debug code; xfail-pretty reverse-complement.
2013-04-19 12:00:48 -07:00
Patrick Walton
c995a62d44
librustc: WIP patch for using the return value.
2013-04-19 12:00:08 -07:00
Patrick Walton
0b0ca597bf
librustc: Improve inlining behavior.
2013-04-19 11:53:34 -07:00
Patrick Walton
4c29b4cb93
librustc: Optimize metadata::decoder::item_name.
2013-04-19 11:53:33 -07:00
Patrick Walton
53f54dda60
librustc: Remove def_ids from types.
2013-04-19 11:53:33 -07:00
Patrick Walton
04df19c5ca
librustc: Take primitive types out of the type hash table.
2013-04-19 11:53:33 -07:00
Patrick Walton
3ffaaab9e9
librustc: Switch the @
s in types with ~
2013-04-19 11:53:32 -07:00
Patrick Walton
f903ae9e72
librustc: Implement fast-ffi and use it in various places
2013-04-19 11:53:31 -07:00
Patrick Walton
1a36b0f17e
librustc: Remove fail_unless!
2013-04-19 11:53:31 -07:00
bors
d3a58f3797
auto merge of #5943 : brson/rust/struct-return, r=graydon
...
Mac appears to follow the same ABI as MSVC. This fixes one case
but leaves others broken, like windows.
2013-04-18 19:45:48 -07:00
bors
225d74f211
auto merge of #5914 : catamorphism/rust/copy-cops, r=catamorphism
2013-04-18 17:51:51 -07:00
Tim Chevalier
3d43af15d8
rustc: Anti-copy police
...
In this case, some copies are still necessary to convert from
a mutable to an immutable @-box. It's still an improvement,
I hope.
2013-04-18 17:40:42 -07:00
bors
df9cc2eb66
auto merge of #5924 : catamorphism/rust/non-fatal-errors, r=catamorphism
2013-04-18 16:57:51 -07:00
Tim Chevalier
62847b0f24
rustc: Make some typechecker errors non-fatal
2013-04-18 15:12:27 -07:00
Tim Chevalier
18db9a2954
rustc: One less copy
2013-04-18 14:50:29 -07:00