1
1
# RFC policy - the compiler
2
2
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
-
8
3
Compiler RFCs will be managed by the compiler sub-team, and tagged ` T-compiler ` .
9
4
The compiler sub-team will do an initial triage of new PRs within a week of
10
5
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
13
8
should clearly not be done and further discussion is not necessary. We'll follow
14
9
the standard procedure for shepherding, final comment period, etc.
15
10
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.
21
13
22
14
## Changes which need an RFC
23
15
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
37
19
behaviour of the compiler, language, or libraries
38
20
39
-
40
21
## Changes which don't need an RFC
41
22
42
23
* Bug fixes, improved error messages, etc.
43
24
* 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] )
47
32
* Adding unstable API for tools (note that all compiler API is currently unstable)
48
33
* Adding, removing, or changing an unstable compiler flag (if the compiler flag
49
34
is widely used there should be at least some discussion on discuss, or an RFC
50
35
in some cases)
51
36
52
37
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