Skip to content

Commit 4ed89aa

Browse files
committed
Update guide on compiler RFCs
Lots of this is very outdated, mentioning IRC (:D) and not mentioning MCPs, which are very significant. I adjusted it to something that I feel like is roughly true today. I don't know whether it's fully accurate, but it's definitely more accurate than before.
1 parent 089e1f3 commit 4ed89aa

File tree

1 file changed

+18
-28
lines changed

1 file changed

+18
-28
lines changed

compiler_changes.md

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# RFC policy - the compiler
22

3-
We have not previously had an RFC system for compiler changes, so policy here is
4-
likely to change as we get the hang of things. We don't want to slow down most
5-
compiler development, but on the other hand we do want to do more design work
6-
ahead of time on large additions and refactorings.
7-
83
Compiler RFCs will be managed by the compiler sub-team, and tagged `T-compiler`.
94
The compiler sub-team will do an initial triage of new PRs within a week of
105
submission. The result of triage will either be that the PR is assigned to a
@@ -13,41 +8,36 @@ believe it should be done without an RFC, or closed because the sub-team feel it
138
should clearly not be done and further discussion is not necessary. We'll follow
149
the standard procedure for shepherding, final comment period, etc.
1510

16-
Where there is significant design work for the implementation of a language
17-
feature, the preferred workflow is to submit two RFCs - one for the language
18-
design and one for the implementation design. The implementation RFC may be
19-
submitted later if there is scope for large changes to the language RFC.
20-
11+
Most compiler decisions that go beyond the scope of a simple PR are done using [MCP]s,
12+
not RFCs. It is therefore likely that you should file an MCP instead of an RFC for your problem.
2113

2214
## Changes which need an RFC
2315

24-
* New lints (these fall under the lang team)
25-
* Large refactorings or redesigns of the compiler
26-
* Changing the API presented to syntax extensions or other compiler plugins in
27-
non-trivial ways
28-
* Adding, removing, or changing a stable compiler flag
29-
* The implementation of new language features where there is significant change
30-
or addition to the compiler. There is obviously some room for interpretation
31-
about what constitutes a "significant" change and how much detail the
32-
implementation RFC needs. For guidance, [associated items](text/0195-associated-items.md)
33-
and [UFCS](text/0132-ufcs.md) would clearly need an implementation RFC,
34-
[type ascription](text/0803-type-ascription.md) and
35-
[lifetime elision](text/0141-lifetime-elision.md) would not.
36-
* Any other change which causes backwards incompatible changes to stable
16+
* Significant user-facing changes to the compiler with a complex design space,
17+
especially if they involve other teams as well (for example, [path sanitization]).
18+
* Any other change which causes significant backwards incompatible changes to stable
3719
behaviour of the compiler, language, or libraries
3820

39-
4021
## Changes which don't need an RFC
4122

4223
* Bug fixes, improved error messages, etc.
4324
* Minor refactoring/tidying up
44-
* Implementing language features which have an accepted RFC, where the
45-
implementation does not significantly change the compiler or require
46-
significant new design work
25+
* Large refactorings or redesigns of the compiler (needs an [MCP])
26+
* Implementing language features which have an accepted RFC.
27+
* New lints (these fall under the lang team). Lints are best first tried out in clippy
28+
and then uplifted later.
29+
* Changing the API presented to syntax extensions or other compiler plugins in
30+
non-trivial ways
31+
* Adding, removing, or changing a stable compiler flag (needs an [MCP])
4732
* Adding unstable API for tools (note that all compiler API is currently unstable)
4833
* Adding, removing, or changing an unstable compiler flag (if the compiler flag
4934
is widely used there should be at least some discussion on discuss, or an RFC
5035
in some cases)
5136

5237
If in doubt it is probably best to just announce the change you want to make to
53-
the compiler subteam on discuss or IRC, and see if anyone feels it needs an RFC.
38+
the compiler subteam on [Zulip], and see if anyone feels it needs an RFC.
39+
40+
[MCP]: https://github.com/rust-lang/compiler-team/issues
41+
[path sanitization]: https://github.com/rust-lang/rfcs/pull/3127
42+
[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler
43+

0 commit comments

Comments
 (0)