Remove ast from Rule

It's always null

--
MOS_MIGRATED_REVID=106053287
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java
index 94df8ea..579e060 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Package.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java
@@ -35,7 +35,6 @@
 import com.google.devtools.build.lib.packages.AttributeMap.AcceptsLabelAttribute;
 import com.google.devtools.build.lib.packages.License.DistributionType;
 import com.google.devtools.build.lib.packages.PackageFactory.Globber;
-import com.google.devtools.build.lib.syntax.FuncallExpression;
 import com.google.devtools.build.lib.util.Pair;
 import com.google.devtools.build.lib.vfs.Canonicalizer;
 import com.google.devtools.build.lib.vfs.Path;
@@ -1002,15 +1001,14 @@
      * <p>Useful for RuleClass instantiation, where the rule name is checked by trying to create a
      * Label. This label can then be used again here.
      */
-    Rule newRuleWithLabel(Label label, RuleClass ruleClass, FuncallExpression ast,
-        Location location) {
-      return newRuleWithLabelAndAttrContainer(label, ruleClass, ast, location,
+    Rule newRuleWithLabel(Label label, RuleClass ruleClass, Location location) {
+      return newRuleWithLabelAndAttrContainer(label, ruleClass, location,
           new AttributeContainer(ruleClass));
     }
 
-    Rule newRuleWithLabelAndAttrContainer(Label label, RuleClass ruleClass, FuncallExpression ast,
-        Location location, AttributeContainer attributeContainer) {
-      return new Rule(pkg, label, ruleClass, ast, location, attributeContainer);
+    Rule newRuleWithLabelAndAttrContainer(Label label, RuleClass ruleClass, Location location,
+        AttributeContainer attributeContainer) {
+      return new Rule(pkg, label, ruleClass, location, attributeContainer);
     }
 
     /**
diff --git a/src/main/java/com/google/devtools/build/lib/packages/PackageDeserializer.java b/src/main/java/com/google/devtools/build/lib/packages/PackageDeserializer.java
index 4a4ae10..302240f 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/PackageDeserializer.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/PackageDeserializer.java
@@ -369,7 +369,7 @@
    * Deserialize a package from its representation as a protocol message. The inverse of
    * {@link PackageSerializer#serialize}.
    * @throws IOException
-   * @throws InterruptedException 
+   * @throws InterruptedException
    */
   private void deserializeInternal(Build.Package packagePb, StoredEventHandler eventHandler,
       Package.Builder builder, InputStream in)
@@ -472,7 +472,7 @@
    * @return a new {@link Package} as read from {@code in}
    * @throws PackageDeserializationException on failures deserializing the input
    * @throws IOException on failures reading from {@code in}
-   * @throws InterruptedException 
+   * @throws InterruptedException
    */
   public Package deserialize(InputStream in)
       throws PackageDeserializationException, IOException, InterruptedException {
@@ -719,7 +719,7 @@
       Map<String, ParsedAttributeValue> attributeValues, EventHandler eventHandler,
       AttributeContainer attributeContainer)
       throws LabelSyntaxException, InterruptedException {
-    Rule rule = pkgBuilder.newRuleWithLabelAndAttrContainer(label, ruleClass, null, ruleLocation,
+    Rule rule = pkgBuilder.newRuleWithLabelAndAttrContainer(label, ruleClass, ruleLocation,
         attributeContainer);
     rule.checkValidityPredicate(eventHandler);
 
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Rule.java b/src/main/java/com/google/devtools/build/lib/packages/Rule.java
index 1cc5f63..df1cb5e 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Rule.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Rule.java
@@ -35,7 +35,6 @@
 import com.google.devtools.build.lib.packages.Attribute.ConfigurationTransition;
 import com.google.devtools.build.lib.packages.License.DistributionType;
 import com.google.devtools.build.lib.syntax.EvalException;
-import com.google.devtools.build.lib.syntax.FuncallExpression;
 import com.google.devtools.build.lib.syntax.GlobList;
 import com.google.devtools.build.lib.syntax.Type;
 import com.google.devtools.build.lib.util.BinaryPredicate;
@@ -149,15 +148,13 @@
 
   private final Location location;
 
-  private final FuncallExpression ast; // may be null
-
   private final String workspaceName;
 
   // Initialized in the call to populateOutputFiles.
   private List<OutputFile> outputFiles;
   private ListMultimap<String, OutputFile> outputFileMap;
 
-  Rule(Package pkg, Label label, RuleClass ruleClass, FuncallExpression ast, Location location,
+  Rule(Package pkg, Label label, RuleClass ruleClass, Location location,
       AttributeContainer attributeContainer) {
     this.pkg = Preconditions.checkNotNull(pkg);
     this.label = label;
@@ -166,7 +163,6 @@
     this.attributes = attributeContainer;
     this.attributeMap = new RawAttributeMapper(pkg, ruleClass, label, attributes);
     this.containsErrors = false;
-    this.ast = ast;
     this.workspaceName = pkg.getWorkspaceName();
   }
 
@@ -248,15 +244,6 @@
   }
 
   /**
-   * Returns the AST for this rule.  Returns null if the package factory chose
-   * not to retain the AST when evaluateBuildFile was called for this rule's
-   * package.
-   */
-  public FuncallExpression getSyntaxTree() {
-    return ast;
-  }
-
-  /**
    * Returns true iff there were errors while constructing this rule, such as
    * attributes with missing values or values of the wrong type.
    */
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
index 797aeb9..aaa0c7d 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
@@ -1230,7 +1230,7 @@
   Rule createRuleWithLabel(Package.Builder pkgBuilder, Label ruleLabel,
       Map<String, Object> attributeValues, EventHandler eventHandler, FuncallExpression ast,
       Location location) throws LabelSyntaxException, InterruptedException {
-    Rule rule = pkgBuilder.newRuleWithLabel(ruleLabel, this, null, location);
+    Rule rule = pkgBuilder.newRuleWithLabel(ruleLabel, this, location);
     createRuleCommon(rule, pkgBuilder, attributeValues, eventHandler, ast);
     return rule;
   }