]> git.pld-linux.org Git - packages/thunderbird.git/blob - rust-1.33.patch
up to 60.7.0
[packages/thunderbird.git] / rust-1.33.patch
1 # HG changeset patch
2 # User Simon Sapin <simon.sapin@exyr.org>
3 # Date 1547211824 -3600
4 # Node ID f63ebd7e9e281f22e71c268151337178de2c246a
5 # Parent  4f2e84dc490dbbac2a35799b6b9230c105f2cd35
6 Bug 1519729 - Document public macros. r=emilio
7
8 Undocumented public macros emit warnings in nightly-2019-01-11,
9 and we #![deny] that warning.
10
11 Cherry-picks a commit from https://github.com/servo/servo/pull/22674
12
13
14 diff --git a/servo/components/style/properties/properties.mako.rs b/servo/components/style/properties/properties.mako.rs
15 --- a/servo/components/style/properties/properties.mako.rs
16 +++ b/servo/components/style/properties/properties.mako.rs
17 @@ -3816,17 +3816,24 @@ impl AliasId {
18              % for property in data.all_aliases():
19                  AliasId::${property.camel_case} => "${property.camel_case}",
20              % endfor
21          };
22          formatter.write_str(name)
23      }
24  }
25  
26 -// NOTE(emilio): Callers are responsible to deal with prefs.
27 +/// Call the given macro with tokens like this for each longhand and shorthand properties
28 +/// that is enabled in content:
29 +///
30 +/// ```
31 +/// [CamelCaseName, SetCamelCaseName, PropertyId::Longhand(LonghandId::CamelCaseName)],
32 +/// ```
33 +///
34 +/// NOTE(emilio): Callers are responsible to deal with prefs.
35  #[macro_export]
36  macro_rules! css_properties_accessors {
37      ($macro_name: ident) => {
38          $macro_name! {
39              % for kind, props in [("Longhand", data.longhands), ("Shorthand", data.shorthands)]:
40                  % for property in props:
41                      % if property.enabled_in_content():
42                          % for name in [property.name] + property.alias:
43 @@ -3839,16 +3846,24 @@ macro_rules! css_properties_accessors {
44                          % endfor
45                      % endif
46                  % endfor
47              % endfor
48          }
49      }
50  }
51  
52 +/// Call the given macro with tokens like this for each longhand properties:
53 +///
54 +/// ```
55 +/// { snake_case_ident, true }
56 +/// ```
57 +///
58 +/// … where the boolean indicates whether the property value type
59 +/// is wrapped in a `Box<_>` in the corresponding `PropertyDeclaration` variant.
60  #[macro_export]
61  macro_rules! longhand_properties_idents {
62      ($macro_name: ident) => {
63          $macro_name! {
64              % for property in data.longhands:
65                  { ${property.ident}, ${"true" if property.boxed else "false"} }
66              % endfor
67          }
68 # HG changeset patch
69 # User Emilio Cobos Álvarez <emilio@crisal.io>
70 # Date 1547412158 -3600
71 # Node ID 1a1d8b9f1a3ab704ab277407823f6f42dd63a3d4
72 # Parent  a2f691714d70fa6a9119503270809fa0eb8df6c6
73 Bug 1519629 - Document a few more macros.
74
75
76 diff --git a/servo/components/style/gecko/regen_atoms.py b/servo/components/style/gecko/regen_atoms.py
77 --- a/servo/components/style/gecko/regen_atoms.py
78 +++ b/servo/components/style/gecko/regen_atoms.py
79 @@ -125,16 +125,17 @@ PRELUDE = '''
80  RULE_TEMPLATE = ('("{atom}") =>\n  '
81                   '{{{{ '
82                   '#[allow(unsafe_code)] #[allow(unused_unsafe)]'
83                   'unsafe {{ $crate::string_cache::atom_macro::atom_from_static'
84                   '($crate::string_cache::atom_macro::{name} as *mut _) }}'
85                   ' }}}};')
86  
87  MACRO = '''
88 +/// Returns a static atom by passing the literal string it represents.
89  #[macro_export]
90  macro_rules! atom {{
91  {}
92  }}
93  '''
94  
95  
96  def write_atom_macro(atoms, file_name):
97 --- firefox-60.6.1/servo/components/style/properties/properties.mako.rs.orig    2019-03-22 06:01:07.000000000 +0100
98 +++ firefox-60.6.1/servo/components/style/properties/properties.mako.rs 2019-04-14 12:19:55.687706977 +0200
99 @@ -55,6 +55,7 @@
100  
101  pub use self::declaration_block::*;
102  
103 +/// doc stub
104  #[cfg(feature = "gecko")]
105  #[macro_export]
106  macro_rules! property_name {
This page took 0.064034 seconds and 3 git commands to generate.