]> git.lizzy.rs Git - rust.git/blob - src/doc/complement-bugreport.md
Auto merge of #21401 - kballard:optimize-shrink-to-fit, r=nikomatsakis
[rust.git] / src / doc / complement-bugreport.md
1 % How to submit a Rust bug report
2
3 # I think I found a bug in the compiler!
4
5 If you see this message: `error: internal compiler error: unexpected panic`,
6 then you have definitely found a bug in the compiler. It's also possible that
7 your code is not well-typed, but if you saw this message, it's still a bug in
8 error reporting.
9
10 If you see a message about an LLVM assertion failure, then you have also
11 definitely found a bug in the compiler. In both of these cases, it's not your
12 fault and you should report a bug!
13
14 If you see a compiler error message that you think is meant for users to see,
15 but it confuses you, *that's a bug too*. If it wasn't clear to you, then it's
16 an error message we want to improve, so please report it so that we can try
17 to make it better.
18
19 # How do I know the bug I found isn't a bug that already exists in the issue tracker?
20
21 If you don't have enough time for a search, then don't worry about that. Just submit
22 the bug. If it's a duplicate, somebody will notice that and close it during triage.
23
24 If you have the time for it, it would be useful to type the text of the error
25 message you got [into the issue tracker search box](https://github.com/rust-lang/rust/issues)
26 to see if there's an existing bug that resembles your problem. If there is,
27 and it's an open bug, you can comment on that issue and say you are also affected.
28 This will encourage the devs to fix it. But again, don't let this stop you from
29 submitting a bug. We'd rather have to do the work of closing duplicates than
30 miss out on valid bug reports.
31
32 # What information should I include in a bug report?
33
34 It generally helps our diagnosis to include your specific OS (for example: Mac OS X 10.8.3,
35 Windows 7, Ubuntu 12.04) and your hardware architecture (for example: i686, x86_64).
36 It's also helpful to provide the exact version and host by copying the output of
37 re-running the erroneous rustc command with the `--version --verbose` flags, which will
38 produce something like this:
39
40 ```text
41 rustc 0.12.0 (ba4081a5a 2014-10-07 13:44:41 -0700)
42 binary: rustc
43 commit-hash: ba4081a5a8573875fed17545846f6f6902c8ba8d
44 commit-date: 2014-10-07 13:44:41 -0700
45 host: i686-apple-darwin
46 release: 0.12.0
47 ```
48
49 Finally, if you can also provide a backtrace, that'd be great. You can get a
50 backtrace by setting the `RUST_BACKTRACE` environment variable to `1`, like
51 this: 
52
53 ```bash
54 $ RUST_BACKTRACE=1 rustc ...
55 ```
56
57 # I submitted a bug, but nobody has commented on it!
58
59 This is sad, but does happen sometimes, since we're short-staffed. If you
60 submit a bug and you haven't received a comment on it within 3 business days,
61 it's entirely reasonable to either ask on the #rust IRC channel,
62 or post on the [rust-dev mailing list](https://mail.mozilla.org/listinfo/rust-dev)
63 to ask what the status of the bug is.